Andy11548 Posted July 15, 2011 Share Posted July 15, 2011 This is the full error: Warning: mail() [function.mail]: SMTP server response: 550 The address is not valid. in C:\wamp\www\test.php on line 17 And this is my code: <?php if(@$_POST['submit']) { //Get data from form $name = $_POST['name']; $message = $_POST['message']; if(!empty($name)&&!empty($message)) { $to = "[email protected]"; $subject = "Activation Email from Andy Websites"; $from = "[email protected]"; $headers = "From: [email protected]"; $body = "This is a email from ".$name."\n\n".$message; mail($to, $subject, $body, $headers); // LINE 17 } else { echo 'Please fill out all fields.'; } } ?> I'm really confused :S Quote Link to comment https://forums.phpfreaks.com/topic/242055-mail-error-smtp-server-response-550-the-address-is-not-valid/ Share on other sites More sharing options...
TeNDoLLA Posted July 15, 2011 Share Posted July 15, 2011 Maybe the SMTP server you are using needs authorization (which is not possible with php's mail() function). What mail server are you using? Quote Link to comment https://forums.phpfreaks.com/topic/242055-mail-error-smtp-server-response-550-the-address-is-not-valid/#findComment-1243046 Share on other sites More sharing options...
Andy11548 Posted July 15, 2011 Author Share Posted July 15, 2011 hMailServer, I couldn't find any others haha. Just chose the first one I saw. What would you recommend using? Thanks, Andy. Quote Link to comment https://forums.phpfreaks.com/topic/242055-mail-error-smtp-server-response-550-the-address-is-not-valid/#findComment-1243047 Share on other sites More sharing options...
TeNDoLLA Posted July 15, 2011 Share Posted July 15, 2011 Haven't used that one, actually haven't used much php's mail at all. Got a lil experience with sendmail (linux) but thats it. Maybe this helps: http://www.hmailserver.com/forum/viewtopic.php?f=6&t=4685 ? Quote Link to comment https://forums.phpfreaks.com/topic/242055-mail-error-smtp-server-response-550-the-address-is-not-valid/#findComment-1243048 Share on other sites More sharing options...
trq Posted July 15, 2011 Share Posted July 15, 2011 Unless live.co.uk is your domain you will always have trouble trying to send mail pretending to be from that domain. You should send your email from a valid email address on the same server that is actually sending the mail. Quote Link to comment https://forums.phpfreaks.com/topic/242055-mail-error-smtp-server-response-550-the-address-is-not-valid/#findComment-1243049 Share on other sites More sharing options...
Andy11548 Posted July 15, 2011 Author Share Posted July 15, 2011 I give up on email send scripts, they've never worked for me lol. It confuses the shit out of me this does. Quote Link to comment https://forums.phpfreaks.com/topic/242055-mail-error-smtp-server-response-550-the-address-is-not-valid/#findComment-1243052 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.