Re: RE: SMTP mail() problem
| From: | Chris Kay | Date: | Sat, 26 Apr 2003 14:41:30 +0000 |
| Subject: | Re: RE: SMTP mail() problem | ||
| References: | 1 | Groups: | php.general php.windows |
| Request: | Send a blank email to php-windows+get-19632@lists.php.net to get a copy of this message | ||
It looks to me from the function you have part of your message link in with your from address...
you also dont need to set another variable for your "to" email.
try something like
function email ($username, $email, $password)
{
$subject = "Bla";
$mailcontent = "Your Username is: $username\n";
$mailcontent .= "Your Password is: $password\n\n";
$mailcontent .= "Please store this email in a secure place or\n";
$mailcontent .= "delete it for security purposes\n";
$headers = "From: Name <email@example.com>\r\n";
mail($email, $subject, $mailcontent, $headers);
return true;
}
this is UNTESTED code, but at a glance it should work...
Regards
At 01:13 PM 26/04/2003 +0000, Bobby Rahman wrote:
Hiya Im getting this SMTP error in Win98...has anyone come across it. Its strange as I know I had email working at some stage. Warning: mail() [function.mail]: SMTP server response: 451 Temporary local problem - please try later in This is the code Im trying to run: function email ($username, $email, $password) {Chris Kay (CK) Eleet Internet Services Ph: 0415 451 372 Email: chris@eleet.com.au$email_add =$email;$subject = "Bla"; $mailcontent = "Your Username is: ".$username."\n" ."Your Password is: ".$password."\n"; $fromaddress = "Bla \nPlease store this email in a secure place or delete for \nsecurity purposes"; mail($email_add, $subject, $mailcontent, $fromaddress); return true;} I have set in my php.ini my smtp server to my ISP account so using smtp.freeserve.co.uk at moment. What worries me usually if it cant find the smtp server or the smtp server not working it just times out after 30 secs but this error says there is a local problem. Thanks in advance who anyone who can point me in the right direction Bobby _________________________________________________________________ Worried what your kids see online? Protect them better with MSN 8 http://join.msn.com/?page=features/parental&pgmarket=en-gb&XAPID=186&DI=1059 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php