Re: RE: SMTP mail() problem

From: Date: Mon, 28 Apr 2003 08:50:29 +0000
Subject: Re: RE: SMTP mail() problem
References: 1  Groups: php.general php.windows 
Request: Send a blank email to php-windows+get-19687@lists.php.net to get a copy of this message
----- Original Message ----- From: "Bobby Rahman" <bobby_rahman2002@hotmail.com> Subject: [PHP] RE: SMTP mail() problem > 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 Your server might be overloaded. The problem (as rfc822 about smtp servers and your response) is temporal, and you should try again later to send a mail message. This is not a big problem usually, but as the message should be sended at the moment you migth try using another mail server. Check, there is a lot of free smtp servers you can use (search at google as your first choice). (If is in your computer, try to don't use it like a server under win98, but you can redirect the mail to localhost and obtain a good remailer to use as sendmail, I guess.) The problem is that the other servers, because are free, it handles a lot of mails and can have the same problem. You can still change company for your delivers, or keep trying. I don't know but is a question to make to the list audience, and can be useful. Is there a way to assign more than one smtp servers to use and choose randomly or in another way? By the way, your code is not good at all, this migth work. If the code below don't work, then change all the "\n" into "\r\n". -------------------------------------------------------------- function email($username,$email,$password){ $to=$email; //Mail of destination $subject="Bla"; // Identificative subjects works better ;-) // Be polite :-) $message="Hello. This is a message for confirmation (or updating or whatever) of ...\n\n"; // The information to transmit $message.="Username=$username\nPassword=$password\n"; // There is no reason to put the next line into the headers. $message.="Please store this email in a secure place or delete for\nsecurity purposes"; // The user probably won't read the headers but the message. // Still polite... and trusted $message.=\n\nSincerely,\n\nMe.\nMy Company\nmyemail@myserver.tld" // Is a good practice to do this (RFC2045). Headers first defined at RFC822 $headers="MIME-Version: 1.0\nContent-Type: text/plain;charset=\"iso-8859-1\"\n"; // Who is sending this message? $headers.="From: Me<myemail@myserver.tld>\n"; //For example // It also can be included: "Reply-To: <othermail@myserver.tld>" mail($to,$subject,$message,$headers); // Let's send the message return true; } -------------------------------------------------------------- >function email ($username, $email, $password) >{ > $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; > } Greetings and the best luck. Mario Soto mario_s@amigo.net.gt -.-.-.-

« previous php.windows (#19687) next »