Glenskie Posted September 27, 2011 Share Posted September 27, 2011 ok well my registration page is supposed to send out an email so the user can activate his or her account , but it will not send! i am using xampp for my local webhost and my php.ini settings are [mail function] ; For Win32 only. ; http://php.net/smtp SMTP = relay.jangosmtp.net ; http://php.net/smtp-port smtp_port = 587 ; For Win32 only. ; http://php.net/sendmail-from sendmail_from = [email protected] sendmail_path="\"C:\xampp\sendmail\sendmail.exe\"-t and my sendmail.ini is account Gmail tls on tls_certcheck off host relay.jangosmtp.net from [email protected] auth on user [email protected] password mypassword port 587 account default : Gmail and now here is my php script that sends the mail but it wont send , the reason i put those .ini files in here is because that is what xampp uses to send mail. here is the php script <?php $to = "$email1";// which is established further up on the script which is to big! $from = '[email protected]'; // same email used in php.ini and sendmail.ini but wont send $subject = 'Complete Your ' . $dyn_www . ' Registration'; //Begin HTML Email Message $message = "Hi $username, Complete this step to activate your login identity at $dyn_www Click the line below to activate when ready http://$dyn_www/activation.php?id=$id&sequence=$db_password If the URL above is not an active link, please copy and paste it into your browser address bar Login after successful activation using your: E-mail Address: $email1 Password: $pass1 See you on the site!"; //end of message $headers = "From: $from\r\n"; $headers .= "Content-type: text\r\n"; mail($to, $subject, $message, $headers); // supposed to send but wont ?> Link to comment https://forums.phpfreaks.com/topic/247923-registration-page-not-sending-email/ Share on other sites More sharing options...
Pikachu2000 Posted September 27, 2011 Share Posted September 27, 2011 php's mail function does not support smtp authentication. You would need to use PEAR::MAIL, SwiftMailer, or a similar class if you need to authenticate. Link to comment https://forums.phpfreaks.com/topic/247923-registration-page-not-sending-email/#findComment-1273068 Share on other sites More sharing options...
Glenskie Posted September 27, 2011 Author Share Posted September 27, 2011 i wana thank you very much , now how would i user the pear thing? Link to comment https://forums.phpfreaks.com/topic/247923-registration-page-not-sending-email/#findComment-1273069 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.