0

I use a generic script for contact forms, which works OK on both UK2 and 1&1. However, I've tried this on GoDaddy and it doesn't send emails:

$name = $_POST['name'];
$content = "From:\n" . $name . "\n\n";
$content .= "Email address:\n" . $_POST['email'] . "\n\n";
$content .= "Message:\n" . wordwrap($_POST['message'], 70);

//send email
if (strcmp($content, "") === 0) {
    echo "err";
    die();
}

mail("myemail@email.com", "Website Enquiry", $content);

An answer on GoDaddy's support website was this:

"What I was told was that GoDaddy has two different mail servers, Workspace and the cPanel server. GoDaddy has to turn on their MX entries (don't ask me what that is) so that the mail will be sent through the cPanel server."

However, GoDaddy support have told me this is setup correctly on my server.

Are there any headers that need passing in on GoDaddy?

Thanks in advance.

mfisher91
  • 805
  • 1
  • 8
  • 23
  • Your SMTP configuration? Have you read the GoDaddy documentation and understand how mail works with them? [Example](https://stackoverflow.com/questions/41084652/issue-on-how-to-setup-smtp-using-phpmailer-in-godaddy-server). – ficuscr Jul 18 '18 at 18:45
  • I've spoken with GoDaddy support - they've said I shouldn't need all that with the `mail` function – mfisher91 Jul 18 '18 at 18:53
  • I'm using a pear component to do that... If its fine for you, I can provide the code – Andre.Santarosa Jul 18 '18 at 20:11

0 Answers0