Home About Feedback Advertise The Lab Sitemap

Google Adsense Pepperjam Network Adbrite Text Link Ads Bidvertiser Kontera
More...


problem in sending mails through php mail script ??




HI,

I have Linux server and today i have faced some critical problem,when i send mail through php mail script with smtp authentication i got the folllowing error—->>

"Failed to send data [SMTP: Invalid response code received from server (code: 503, response: All RCPT commands were rejected with this error: Temporary local problem - please try later Valid RCPT command must precede DATA)]"

And the same code work with my another domain so please do needful..

Here is my sample php mail script—>>

<?php
require_once "Mail.php";

$from = "Sandra Sender <sender@example.com>";
$to = "Ramona Recipient <recipient@example.com>";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";

$host = "mail.example.com";
$username = "smtp_username";
$password = "smtp_password";

$headers = array (’From’ => $from,
‘To’ => $to,
‘Subject’ => $subject);
$smtp = Mail::factory(’smtp’,
array (’host’ => $host,
‘auth’ => true,
‘username’ => $username,
‘password’ => $password));

$mail = $smtp->send($to, $headers, $body);

if (PEAR::isError($mail)) {
echo("<p>" . $mail->getMessage() . "</p>");
} else {
echo("<p>Message successfully sent!</p>");
}
?>

Thanks in advance..:)


Related Entries:
SMTP configuration ?
SMTP configuration ?
Outlook can not send mail, Error 0×800CCC19
mail rejected
Emails to Subscribers.
error: array type has incomplete element type

Leave a Reply