SMTP server response: 550 Rcpt-To validation failed?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
NEWDAY
Forum Newbie
Posts: 12
Joined: Wed Jan 31, 2007 5:15 pm

SMTP server response: 550 Rcpt-To validation failed?

Post 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?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Your request was rejected.
NEWDAY
Forum Newbie
Posts: 12
Joined: Wed Jan 31, 2007 5:15 pm

Post 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?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post 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.
NEWDAY
Forum Newbie
Posts: 12
Joined: Wed Jan 31, 2007 5:15 pm

Post by NEWDAY »

feyd | Please use

Code: Select all

,

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

,

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]
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post 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.
Post Reply