Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP's mail() function doesn't work on GoDaddy dedicated server
    primarykey
    data
    text
    <p>I have a website that is hosted by GoDaddy on a virtual dedicated platform, and I haven't been able to get the <code>mail()</code> function to work properly in my PHP script. I'm trying to send emails with validation codes to people when they first sign up to my website, and the <code>mail()</code> function works great for Gmail address, but not others like AOL or even GoDaddy's email service!</p> <p>I tried talking with multiple GoDaddy support reps but they weren't really helpful on the issue. I've looked around online and it seems like this is a very common problem with people who are hosting their websites on GoDaddy. I'm not getting bounce back emails when I the emails fail so it's hard to know what's going on.</p> <p>Here is my PHP code:</p> <pre><code>$sendtoemail = 'newsignup@aol.com'; $emailsubject = "Please validate your email"; $emailbody = "Validation info, blah blah."; $emailheader = 'From: admin@example.com' . "\r\n" . 'X-Mailer: PHP' . "\r\n" . 'Reply-To: admin@example.com' . "\r\n" . '-fadmin@example.com'; mail($sendtoemail, $emailsubject, $emailbody, $emailheader); </code></pre> <p>I've gotten a few errors when I checked <code>/usr/local/psa/var/log/maillog</code> (accessed through PuTTY SSH) that all ended in: <code>deferral: ./Maildir:_No_such_file_or_directory/</code></p> <p>I have also activated reverse DNS on my hosting account and created an SPF DNS record that sends email through "GoDaddy only" and checked the "Include PTR" box for DNS lookup. This was under the "TXT (text)" section of the "Zone File Editor" on GoDaddy's DNS manager. (Hopefully that makes more sense to you than it does to me).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload