• Ok, before I get too far into this, I just want to lay out that I’m not a PHP ace (yet) and its very possible there are things I am overlooking.

    I am running wp1.5 (and have since the beta). Yahoo stuck my blog on their ‘hey everyone go see this site’ thingie and many, many people did. Not good for a DSL line no? So, I had to take my otherwise perfectly functioning wp install and move it to a friends machine which is on a 100mbps line. I got the whole site working and all except, I dont get comment notifies or spam moderation notifies. So, my setup is like such:

    I do not have root and my friend is hard to get a hold of.
    The server has some very weird qmail setup (once again the admin cant fix that up til he re-learns qmail)
    So, I cant use the local email server, I cant edit php.ini to point it elsewhere and doing so would be a bad idea.
    WP appears to eventually use the built in php mail() function via @wp_mail(). So I’ve traced down the two functions that appear to do the mailing jobs in question. wp_notify_moderator() and wp_notify_postauthor(). I’ve looked around for solutions to this in WP and havent found any that fit my problem of using an external smtp server. While looking, I did find a mention of the phpmailmailer (https://phpmailer.sourceforge.net/) class to send mail so I backed up the comment-functions.php file and tried (perhaps not smartly) to umm. temporarily incorporate the class into the functions. For the most part its almost a drop in but no matter what I do, I cant even get WP to use it, gosh, I cant even get WP to break (and I did try.. big printf’s before a header should do it) but to no avail. A case of WP being too stable ??

    So that tells me that perhaps its not using the functions? I’m wondering just how wp sends the mail to authors and such if not via these two functions and mail().

    About phpmailer, to speed in the processes of elimination, I wrote a quick little script alone with it and it worked fine from the server.

    Sorry its so long. Anyone know about the mail stuff or any obviously easy way to set an external smtp without being root?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Scott Reilly

    (@coffee2code)

    WordPress & Plugin Developer

    wpPHPMailer is a plugin that includes PHP Mailer to send mail through an SMTP server (and bypass any attempts to use sendmail via mail()). I’m updating the plugin this week, but it should work as described at the site. The only change you have to bear in mind is that in WP 1.5 you only have to change one line of code instead of four; in wp_mail() change the @mail call to @phpmailer (after you’ve activated the plugin, that is)

    Thread Starter eosyn

    (@eosyn)

    Oh my! Thank you a bunch!

    whats the chance that there is an updated version of this plugin for 2.0? Im afraid to use a 1.5 plugin with 2.0

    ok. i couldn’t resist, so i went ahead and installed wp-phpmailer plugin on WordPress 2.0 install. My server for some reason does not send using sendmail, only SMTP. after the simple configuration of the script, I was receiving emails for registered users just fine. i still need to test comments, etc but so far so good!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘The mythical wp_mail function’ is closed to new replies.