Re: Re: RE: SMTP mail() problem
| From: | Bobby Rahman | Date: | Sun, 27 Apr 2003 04:43:02 +0000 |
| Subject: | Re: Re: RE: SMTP mail() problem | ||
| Groups: | php.general php.windows | ||
| Request: | Send a blank email to php-general+get-145394@lists.php.net to get a copy of this message | ||
I took ur advice and changed my code and still no joy....strange?
is this a code problem or a server problem?
Im using my ISP server SMTP=smtp.freeserve.co.uk
I have tried other STMP servers by setting in php.ini (not sure they should work in theory)
Is there anything else that needs configuring in php.ini to get this working or even with my freeserve account?
IF that all fails has anyone got suggestions of getting round this to be able to send mails? I can only think of downloading a mail server !!!!!
From: Chris Kay <chris@eleet.com.au> To: "Bobby Rahman" <bobby_rahman2002@hotmail.com>, php-general@lists.php.net CC: php-windows@lists.php.net Subject: [PHP-WIN] Re: [PHP] RE: SMTP mail() problem Date: Sun, 27 Apr 2003 00:41:30 +1000 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) {_________________________________________________________________ Overloaded with spam? With MSN 8, you can filter it out http://join.msn.com/?page=features/junkmail&pgmarket=en-gb&XAPID=32&DI=1059$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 -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php$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