Skip to content

[PHP HELP] Account creator question

Featured Replies

Does someone can give me script for sending email to a specific address?

I have account creator which is fully working but doesnt send email with the verification code. I dont know where I have

to put my smtp server.

This is the sendoing code:

 

// Send an email to the address entered

$body =  $language[$lang][104]."\n";

$body .= "+---------------------------------------------------------------------------------+\n";

$body .= "|".$language[$lang][110]."\n";

$body .= "|".$language[$lang][115]."\n";

$body .= "|".$language[$lang][117]." ".$verify."\n";

$body .= "|\n|".$language[$lang][127]."\n";

$body .= "|".$language[$lang][128]."\n|\n";

$body .= "+---------------------------------------------------------------------------------+\n";

$body .= "|".$language[$lang][121]."\n";

$body .= "|".$language[$lang][122]."\n";

$body .= "+---------------------------------------------------------------------------------+\n";

$body .= $language[$lang][123];

$to = $_POST['email'];

$subject = $language[$lang][104];

$headers .= "Reply-to: ".$from."\r\n";

if ($audit == 1)

{

$headers .= "Bcc: ".$auditaddress."\r\n";

}

$headers .= "X-Mailer: PHP/" . phpversion();

mail ($to, $subject, $body, $headers);

$message .= $language[$lang][45];

 

 

 

 

that is the config.php file

 

 

 

 

<?php

// Turn registration on and off here, 0 for off and 1 for on

$debug = 1;

$datehour = date('G');

$datemin = date('i');

 

// Hour and min vars to turn registration on and off for server maintinance

// $maint can store up to 24 hours to turn off registration in a 24-hour format

$maint = array (01 => '2', '4', '10', '12', '18', '20');

$maintmin = 15;

$maintmax = 30;

$mainttime = '0';

 

// Mailing function (0 for off, 1 for on)

$mail = 1;

 

// Email address from which to notify users of changes

$from = "support@l2-silver.com";

 

// Database Server IP address

$dbhost='localhost';

 

// Database Server MSSQL engine username

$dbuser='xxx';

 

// Database Server MSSQL username password

$dbpassword='xxx';

 

// Enable backend logging (custom for my admin panel)

$log = 0;

 

// Databse names

// Auth DB

$dbauth = "lin2db";

$dblog = "AdminPanel";

 

// Flag for encrytion function (0 = unencrypted passwords, 1 = encrypted Passwords)

$encrypted=1;

 

// Title for your site

$page_title="L2-Silver";

 

// Url users can see your games rules

$rulesurl = "http://www.l2-silver.com";

 

// Auditing on or off (used if you want to see the actual emails sent out)

$audit = 1;

 

// Audit email

$auditaddress = "support@l2-silver.com";

 

// Mass email (used at L2R only)

$massemail = 0;

 

// Use image verification

$imagever = 1;

 

// Default language to display in the system in

$dlang = "english";

// List installed language packs here

$ilang = array (0 => 'English', 'Deutsch', 'Espanol' ,'Francais', 'Greek', 'Italiano', 'Portugues', 'Polish', 'StormBringer');

 

// Timezone for the server (see http://us.php.net/manual/en/timezones.php for a valid timezone format)

date_default_timezone_set('America/Chicago');

 

 

// ALTER BELOW THIS LINE AT YOUR OWN RISK

// I MAKE NO PERSONAL GUARNTEE THAT THIS

// SCRIPT SYSTEM WILL CONTINUE TO WORK

// IF YOU DO MAKE CHANGES

$headers = "From: ".$from."\r\n";

$months = array (01 => 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September ',

'October', 'November', 'December');

$days = range (1, 31);

$years = range (1950, 2006);

$version = "3.3.2";

require ('lang.php');

?>

 

dood check your config.php there must be the SMTP Stuff

 

SMTP Server for Sending Emails

Username for SMTP server

Password for SMTP server

  • Author

dood check your config.php there must be the SMTP Stuff

 

SMTP Server for Sending Emails

Username for SMTP server

Password for SMTP server

 

that line is missing,i provided here my config file.

so use a other Account Manager, where the SMTP option exist....

  • Author

so use a other Account Manager, where the SMTP option exist....

 

/*Enable Email Functions [Default: 1]*/

$CONFIG['email'] = "1";

 

/*Server Reply Email Address [Default: NULL]*/

$CONFIG['emailaddress'] = "xxx";

 

/*SMTP Server for Sending Emails [Default: NULL]*/

$CONFIG['emailsmtp'] = "xxx";

 

/*Username for SMTP server [Default: NULL]*/

$CONFIG['emailuser'] = "xxx";

 

/*Password for SMTP server [Default: NULL]*/

$CONFIG['emailpass'] = "xxx";

 

 

Thats the code for smtp server info. The only thing i dont know is where to insert in in register.php. I mean to make the system read this info :D

  • Author

No PHP programmers here?

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.