Jump to content

[SOLVED] mail send error


fry2010

Recommended Posts

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

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?

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.