2 Replies - 187 Views - Last Post: 31 July 2012 - 10:28 AM Rate Topic: -----

#1 M1CK  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 27-May 12

mail() returns failure, why?

Posted 30 July 2012 - 04:56 PM

I have this script in my website MakeMeDraw.com:

<?
if ($_POST["email"]<>'') {
$ToEmail = 'username@domain.com';
$EmailSubject = "From: ".$_POST["DID"]."\r\n";
$mailheader = "From: ".$_POST["email"]."\r\n";
$mailheader .= "Reply-To: ".$_POST["email"]."\r\n";
$mailheader .= "Content-type: text/html; charset=iso-8859-1\r\n";
$MESSAGE_BODY = "date: ".$_POST["date"]."<br>";
$MESSAGE_BODY .= "Email: ".$_POST["email"]."<br>";
$MESSAGE_BODY .= "Payment: ".$_POST["money"]."<br>";
$MESSAGE_BODY .= "description: ".$_POST["description"]."<br>";
mail($ToEmail, $EmailSubject, $MESSAGE_BODY, $mailheader) or die ("Failure");
} ?>


It was working when I first created the website, but I checked today and it returns Failure now. Could it be some upgrade in the server that has made this code obsolete or there's some error in it that you can see? I have no clue why it stopped working.

Any help will be highly appreciated.
M1CK

Is This A Good Question/Topic? 0
  • +

Replies To: mail() returns failure, why?

#2 CTphpnwb  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2486
  • View blog
  • Posts: 8,528
  • Joined: 08-August 08

Re: mail() returns failure, why?

Posted 30 July 2012 - 05:09 PM

Your host might be blocking outgoing emails. Have you contacted them?
Was This Post Helpful? 1
  • +
  • -

#3 M1CK  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 27-May 12

Re: mail() returns failure, why?

Posted 31 July 2012 - 10:28 AM

View PostCTphpnwb, on 31 July 2012 - 01:09 AM, said:

Your host might be blocking outgoing emails. Have you contacted them?


yes, after your suggestion I contacted support at servage.net and they fixed the issue.

Thank you.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1