Support » Fixing WordPress » How does WP send the user registration email?

  • WP isn’t sending emails (although it says it is) when I create test users to inform them of the password. My mailbox is empty but WP doesn’t complain about not being able to send it. As my box has the minimum services running, is there a requirement for WP to use sendmail or exim or does it handle contacting the remote smpt server itself?

    Please help!


Viewing 15 replies - 16 through 30 (of 57 total)
  • I looked more closely at phpinfo() and noticed this entry in PHP Core:

    sendmail_path /usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i

    Would the ‘’ (it says that exactly…that isn’t modified to stop spam) have any bearing on the issues I am having?

    It does specify a valid email address for in PHP Variables:


    Can someone point me to a very simple PHP file that will send a test message to my mail server so that i can test if it’s WP or my host that is giving me problems?
    Thanks. has some sample scripts. The sendmail_from address shouldn’t have any effect on what you’re sending, unless you have some spam blocker running on your MTA. Phpinfo won’t tell you the MTA, just the path to sendmail. Check to make sure that file really exists. To determine your mta, telnet to the localhost, port 25 and read the banner.

    For a php shell, try (running WordPress).

    If email was working when you had 1.2 a while back, and it’s not working now, it is probably an administration thing. When I started with my current web host, the php mail was configured to not allow mail. Then they upgraded and it was all working again. Perhaps you can find some better tech support or move to a different server. Vote with your dollars.

    thanks very much for your help tahongawaka.
    the problem must lie with my host. i have put in a email request to them to get them to look at it.
    using a simple php script, i am able to get a response back from it stating that it sent the email…however i never receive it. i tried multiple ways and configs.
    i also attempted to telnet to my mail server, but i got a ‘connection refused by host’ or a operation timed out.
    thanks again.

    It appears that there is no MTA on the machine for whatever reason.
    You might try the wp-phpmailer [] and change the configuration to fit how you actually send mail from your account. Hopefully this will work for you and you will have a happy installation again.

    I just changed the header variable to the following in wp_mail in function.php

    ‘$headers = “From:” . get_settings(‘admin_email’) . “\nX-Mailer: PHP/” . phpversion();’

    I got the idea from

    I’m not sure what the X-Mailer:PHP does, but it fixed it.

    Note that the admin email has to be of the form “” otherwise the mail function doesn’t work. Most likely restrictions on my web hosting company.

    Note: My admin email in WP 1.5 under Options->General Options was set to something else then “”, when I changed it and did an update to the options the email change didn’t take effect for the admin user.

    You actually have to go to Users->Your Profile and make the email change there instead.

    Hope this helps.

    Thanks pdysko–your solution ended up being the one that worked for me.

    My host allowed the emails, but I wanted the signup notifications to come from my domain instead of the host’s domain.

    I’m very thankful to you Tahongawaka. I tried for a few hours to make sendmail work and it took me just 20 minutes to install phpmailer and it works, just works. 🙂

    Could *someone* develop a plugin that works akin to FreePops: interact with webmail to send wordpress email on servers who do not provide smtp or php mail?



    I’m having the same problem as the first poster. Here’s the story:

    1. Installation successful, I can login as admin. When I create test users and the registration e-mail is supposed to be sent, it never arrives.

    2. Troubleshooting included updating the functions.php file to fix the known issues. A snippet of my functions.php file is below:

    ‘function wp_mail($to, $subject, $message, $headers = ”) {
    if( $headers == ” ) {
    $headers = “MIME-Version: 1.0\n” .
    “From: ” . get_settings(‘admin_email’) . “\n” .
    “Content-Type: text/plain; charset=\”” . get_settings(‘blog_charset’) . “\”\n”;
    return @mail($to, $subject, $message, $headers);

    This gets rid of the $more argument, which apparently farts when it tries to execute. And it also references the ‘admin_email’ on my host, which does exist as (This was to fix the problem of having a sending out mail from the php file, which most hosts don’t allow)

    And yet, the problem persists.

    So, I ran the test phpmail script on my hosts’s site to make sure the default phpmail works, the code for this is below:



    $mail = new PHPMailer();


    $mail->Host = “”;

    $mail->SMTPAuth = true;

    $mail->Username = “”;

    $mail->Password = “EmailPassword”;

    $mail->From = “”;

    $mail->FromName = “Your Name”;



    $mail->Subject = “Test message sent using the PHPMailer component”;

    $mail->Body = “This is a test message.”;



    I updated all the fields and this works like a charm. My thinking is that somehow I need to integrate the code from the default phpmailer ($mail??) into the code in the functions.php.

    I am not even a coder of php, I just have been following the troubleshooting instructions, but to no avail. Any help would be much appreciated.

    [edit] Also, I’ve created a php info file, but there’s no sendmail path. I don’t have root access, so it doesn’t matter anyway. Also, Brinkster runs windows servers [/edit]

    [edit2] I switched my e-mail in both users and options in the admin section of the wp control panel to, so no problems there [/edit2]

    Moderator James Huff


    Volunteer Moderator 🚀




    Thanks for your help, but that codex only references this thread anyway, and I’ve read through all the solutions and tried them with no changes. I don’t have root access and I can’t install any new phpmail scripts on the server, so I can’t try a different method. Please advise if using Brinkster’s current phpmailer, I can use wordpress at all.



    Were you able to get this working? I just installed and not my users or test accounts are getting the password email either.


    Thanks, I had that problem t0o and fixed it with the bug fix Ryan was linking to. Did all of the other suggestions before without any luck, but when removing the $more everything went fine!

    Moderator James Huff


    Volunteer Moderator 🚀

Viewing 15 replies - 16 through 30 (of 57 total)
  • The topic ‘How does WP send the user registration email?’ is closed to new replies.