• 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!

    Thanks.

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

    sendmail_from me@localhost.com me@localhost.com
    sendmail_path /usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i

    Would the ‘me@localhost.com’ (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:

    _SERVER["SERVER_ADMIN"] webmaster@mydomain.com

    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.

    http://us4.php.net/manual/en/function.mail.php 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 http://gimpster.com/php-shell/ (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 [http://dev.wp-plugins.org/file/wp-phpmailer/trunk/wp-phpmailer.php] 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 http://ca3.php.net/manual/en/function.mail.php

    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 “my@mydomain.com” 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 “my@mydomain.com”, 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.

    monkeymcgee

    (@monkeymcgee)

    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.

    shutdownrunner

    (@shutdownrunner)

    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. 🙂

    nodrone

    (@nodrone)

    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?

    http://www.freepops.org/en/

    al_gorithm

    (@al_gorithm)

    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 admin@mydomain.com. (This was to fix the problem of having a nobody@mydomain.com 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:

    ‘<?

    require(“c:\php\includes\class.phpmailer.php”);

    $mail = new PHPMailer();

    $mail->IsSMTP();

    $mail->Host = “mail.brinkster.com”;

    $mail->SMTPAuth = true;

    $mail->Username = “you@domain.com”;

    $mail->Password = “EmailPassword”;

    $mail->From = “you@domain.com”;

    $mail->FromName = “Your Name”;

    $mail->AddAddress(“user@domain.com”);

    $mail->IsHTML(true);

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

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

    $mail->Send()

    ?>’

    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 admin@mydomain.com, so no problems there [/edit2]

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    al_gorithm

    (@al_gorithm)

    Macmanx,

    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.

    Thanks.

    Al-

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

    jd

    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

    (@macmanx)

    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.