Jump to content

Recommended Posts

i have used the following code

 

<?

ini_set("SMTP", "127.0.0.1");

ini_set("smtp_port", 25);

 

$to = $_POST['to'];//xxx@yahoo.com

$from = "admin@localhost";

$subj = $_POST['subj'];

$msg = $_POST['msg'];

$header = "MIME version: 1.0\r\n";

$header .= "Conttent-type:text/html;charset=ISO-8859-1\r\n";

$header .= "From:$from \r\n";

$header .= "Cc: $cc \r\n";

$header .= "Bcc: $bcc \r\n";

$header .= "Reply-to: <$from>\r\n";

$header .= "X-Mailer: PHP/".phpversion();

 

$mail_sent = mail($to, $subj, $msg, $header);

 

echo $mail_sent ? "Mail sent" : "Mail failed";

exit;?>

but following error occours

 

Warning: mail() [function.mail]: SMTP server response: 553 We do not relay non-local mail, sorry. in D:\xampp\htdocs\mailing\srvrsendmail.php on line 18

Mail failed

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.