fry2010 Posted February 27, 2009 Share Posted February 27, 2009 I have trouble sending email. Here is the error message I get: Warning: mail() [function.mail]: Failed to Receive I am using on windows vista and im pretty sure that its not the virus protection blicking it, and have changed the php.ini file to port 25, and to point to the ntl.world.com smtp. It was working fine on my old computer but cant get it to work on this comp. Any ideas? Link to comment https://forums.phpfreaks.com/topic/147172-solved-mail-send-error/ Share on other sites More sharing options...
shadiadiph Posted February 27, 2009 Share Posted February 27, 2009 you are trying to send mail from a web server correct? from a website? that has php sendmail authorised? Link to comment https://forums.phpfreaks.com/topic/147172-solved-mail-send-error/#findComment-772594 Share on other sites More sharing options...
shadiadiph Posted February 27, 2009 Share Posted February 27, 2009 it shouldn't matter if you are on windows vista xp they have nothing to do with your sendmail which is on your server if it was working before it should still be working with the original settings they are set up so they work what is your sendmail script? have you changed it? or changed your webserver? Link to comment https://forums.phpfreaks.com/topic/147172-solved-mail-send-error/#findComment-772605 Share on other sites More sharing options...
fry2010 Posted February 27, 2009 Author Share Posted February 27, 2009 No I havnt changed service providers, interesting thing to note is that when I remove all but one word in my variables it will send. When I put more words in it fails. Here is the example that works: $email = trim($_POST['email']); $subject = 'hello'; $title = 'Email'; $header = 'From: [email protected]'; if(mail($email,$title,$subject,$header)) { echo 'Confirmation email sent to address'; } else { echo 'Confirmation email has failed to send'; } Here is example that gives the failed error: Ok scratch that..... There was a problem with the header FROM: part....I wasnt using a valid address cause I didnt think it would check, but it must do. Thanks for your response. Link to comment https://forums.phpfreaks.com/topic/147172-solved-mail-send-error/#findComment-772612 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.