Release Notes

Summary: This plugin overrides the default elgg email notification handler and uses PHPMailer. It currently provides support for using the php mail function or a smtp server. See the included readme.txt for more information.

Description: This plugin provides a wrapper to the PHPMailer class. PHPMailer is used by many open source projects including Wordpress and Joomla. The class provides the abaility to send mail through php's mail function, sendmail, qmail, and smtp. It supports html email, file attachments, and embedding images. See for more details. This plugin provides a basic interface to the class but can be extended easily.

Installation: Unzip and place in mod directory. Activate through Tools Administration. There are admin settings for smtp and non-standard MTAs. There are further instructions in the readme.txt file.

SMTP: SMTP can be setup in the admin settings of the plugin. If your ISP requires authorization, see the readme.txt file.

Notes: Other plugins may have their own email sending code and will not use this plugin therefore. The Invite Friends plugin is an example of one. I'm thinking of adding an interface that allows plugins to send emails outside of the elgg notify user system for this reason.

Future Development: I expect to add smtp authentication settings to the plugin settings area and extend the plugin to handle file attachments. Include any suggestions that you might have in the comments. I don't intend to add a significant amount of new features so that is why this is version 0.9.

Bug Reports: Please post them in the comments along with any related error message in your server error log. If you did not read the readme file or check your error log, I am much less likely to spend time giving you support.

Changelog: nothing to report yet

  • Greg, I've been looking for email functionality that could be used to send activity notifications in digest form to subscribed users. A lot of my audience is still not ready to use RSS and needs new information pushed to them. Is phpmailer capable of pointing me in this direction?

  • The key component to a digest email would be writing a plugin that registers for a daily cron event. It would then query for all activity that happened in the past 24 hours when the cron event is triggered, create the email, and then send it out. This could be done with default email notification system. The only reason to use PHPMailer in that scenario would be the ability to send html email if you wanted the email to be formatted.

  • Cash hello, I'm a newbie of course.  I was having a devil of a time with the e-mail they would bounce on my godaddy server for 3 to 6 hours.  You phpmailer fixed the issue, just one problem which you mentioned is the invite.  Just wondering if you know of a work around?

  • Ed, I am fairly certain it would be possible to hack the invite plugin to use the elgg email functions (which would then redirect to the phpmailer plugin). I've been meaning to try that out. Maybe tomorrow? I'll let you know.

  • Still haven't found time to look into the invite plugin yet...

  • I am a bit confused with elgg email setup. is there a way to send out emails from elgg. I am not able to setup the email window, how can i write an email address in elgg

  • @ash, does your question have anything to do with the phpmailer plugin? If not, you would be better off asking it in one of the group forums.

  • Cash, does your plugin work with the Mass Mailouts plugin?

  • Short answer: you can install both, but the Mass Mailout plugin won't use my plugin. The Mass Mailouts plugin has its own custom code for sending out emails rather than using the Elgg core. My plugin overrides the core email code.

  • What does your plugin do? i was under the impresion that your plugin can connect me to the outside world.


  • @ash: Elgg has built in email capabilities using php's mail function. This plugin overrides that to use the PHPMailer class. It provides a little more flexibility.

  • I am wanting email notification when someone replies to a discussion I started.  Right now I have to keep checking the forum to see if there has been a reply.  Is there a plugin for this?



  • version 1.5 is supposed to have better notifications. It seems like I keep saying that, but it is worth waiting for.

  • hi cash... im having trouble installing the php mailer plugin... can u plz help me...

    in the start.php ive edited it to

            $phpmailer->Host = "ssl://";
            $phpmailer->Port = 465;
            $phpmailer->SMTPAuth = true;
            $phpmailer->Username = "my username with out the ''";
            $phpmailer->Password = "my password";

    and in the elgg admin panel, ive enabled phpmailer and checked the smpt checkbox and kept the host blank..

    am i doing a mistake in implementing it.. cause it does not seem to be working...

    im a novice...plz help me with this.. my mails take hours to reach which is creating probs for users to register...

  • Using gmail is a good solution for a test install on Windows when you don't have a mail server. I wouldn't recommend it for a production site due to 1. the number of emails that might be sent - google might not like that and 2. I think the emails get sent with your gmail username in the To field

    Try using your full gmail email address as the username.

    Even better, try using your hosting provider's smtp server. If that is still slow, contact your hosting provider for support.

  • i kno u would hate me if i ask this.. but.. how to i kno if i have a hosting provided smtp server...

    is tht = the email id tht ive purchased from them.. (is yes tht has only 250smtp relay) so dosent tht mean i cna send only 250 emails in a day??? plz through some light...

  • In all seriousness, perhaps you should find a different hosting provider if you need to send more emails than that. And yes, your smtp server will be the one that handles your email. I'd guess that your provider will allow you to setup more than one account so you could have one for your Elgg install.


  • in my default elgg installation all the mails to yahoo are received in it's spam box. No problem with gmail. can i solve this by using this pluggin? thank you

  • @prem - it's possible, but no guarantees. You could try using this plugin to use your hosting provider's smtp server and see if it improves anything.

  • I'll be releasing a new version in a week or so. This current one should work just fine with Elgg 1.5

  • @cash - current version isn't supported by elgg1.5?

  • @liri - as I said in the previous comment, this version works with Elgg 1.5

    I will be releasing a new version in a few days that will have additional features like html email and file attachments.

  • anybody here want to do the config for me? I'd love to pay for it so i don't have to tinker with it!

  • Can you explain the "nonstandard-mta" setting? If you use SMTP it only uses \n endings for the headers but for php mail() delivery it uses \r\n line endings.


    This causes issues with Cisco Ironport security devices which confuse the \r\n for two line breaks and insert an extra header plus blank line in the middle of the mail headers, breaking the mail message.

    Is there a good reason to default to using \r\n when not using SMTP delivery? It seems to just add problems. I have found plenty of people reporting issues with \r\n line endings with PHPMailer whether or not it is "standard".

  • @Dave The nonstandard setting affects the line endings used. Quoting from RFC 5322 (

    "Header fields are lines beginning with a field name, followed by a
       colon (":"), followed by a field body, and terminated by CRLF"

    Selecting non-standard in the settings uses LF in the header. This is sometimes required if your mail transfer agent is doing funky things by reformatting the header (auto replacing LF with CRLF for example)

    Just a note - the release you are commenting on is quite old. You probably want to upgrade. See the list of releases on the side.


  • Category: Communication
  • License: GNU General Public License (GPL) version 2
  • Updated: 2014-11-17
  • Downloads: 17762
  • Recommendations: 33

Other Projects

View Cash's plugins