Page 1 of 1
SMTP server response: 550 Rcpt-To validation failed?
Posted: Thu Mar 01, 2007 6:36 pm
by NEWDAY
When i try to send an e-mail using the mail function in php i get this error:
Warning: mail() [function.mail]: SMTP server response: 550 Rcpt-To validation failed: RCPT TO not accepted: 5.7.1 Unable to relay for
sync2007@gmail.com in C:\AppServ\www\mail_fns.php on line 275
Does any one know the causes of this error and how to prevent it?
Posted: Fri Mar 02, 2007 12:17 am
by feyd
Your request was rejected.
Posted: Fri Mar 02, 2007 1:16 am
by NEWDAY
I understand that the (request was rejected) but this error doesn't appear when I send to a specific email it appears when I send to any email ...
So what I'm asking about is what does the (request was rejected) technically means and what are the causes of letting the (request to be rejected); Is it a problem with my Internet service provider and has nothing to do with the code?
Posted: Fri Mar 02, 2007 7:01 am
by Chris Corbyn
It means your SMTP server is not configured to relay mail for wherever you're sending it from. It's only configured to accept mail for local account it MXes for.
Posted: Fri Mar 02, 2007 7:38 am
by NEWDAY
feyd | Please use Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
So is there someway that I can configure it manually to solve the problem
by the way this is the code:
Code: Select all
<?php
// The message
$message = "Line 1\nLine 2\nLine 3";
// In case any of our lines are larger than 70 characters, we should use wordwrap()
$message = wordwrap($message, 70);
ini_set ( sendmail_from, "sync2007@gmail.com " );
ini_set( SMTP, "smtp.podatel.net" );
ini_set( smtp_port, 25 );
ini_set( sendmail_path , "class.phpmailer");
mail('reka12h7@hotmail.com', 'My Subject', $message);
?>
feyd | Please use Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Posted: Fri Mar 02, 2007 8:21 am
by volka
You might be interested in
http://sourceforge.net/projects/swiftmailer
It even got its own forum here on the board
Swiftmailer
Swiftmailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.