Release Notes

0.5 (2015-12-29):

  • Fixed error after too much cleaning in previous version :-)
  • Hi Michele

    I do not get any page errors sending either using my own local SMTP server or Googles server.

    To make Googles SMTP server work it needs a few extra steps because gmail has so much security.

    Here is what I did:

    Plugin settings:
    Use SMTP                     : Yes
    SMTP server                  : smtp.gmail.com
    SMTP port                    : 587
    Activate SMTP login          : Yes
    SMTP username                : someone@gmail.com
    SMTP password                : yourpassword
    Activate encrypted connection: TLS

    Also made sure site email was changed to the same as SMTP username - not sure this is mandatory, but it makes good sense.

    You also need to do some changes on your gmail account as well:

    Start by accessing your gmail account at https://mail.google.com using the same credentials you used in the plugin settings.

    Go to https://myaccount.google.com/security?hl=en and verify you do have:

    2-Step Verification = Off
    Allow less secure apps = ON

    Go to https://accounts.google.com/DisplayUnlockCaptcha and confirm you will allow next signin to be
    without extra captcha check (something EmailPlus can't do)
     
    Now try sending a message from one Elgg user to another, and verify the email notification goes through. 

    If it does not, then you need to log into your gmail account and verify it was you (or rather your server)
    who did this and it is okay. You probarbly have a new email waiting with a subject like this: "Someone has your password".
    Follow the link in the email to approve access from your webserver.

    The above made it work for me, including sending HTML emails :-)

     

  • Please note that I don't believe anyone running a site should use Google's mail servers. There are all kind of restrictions on number of emails per day, max number of rejected emails per day, max number of recipients pr. email and so forth.

    If you need a mail server for a site, either install one on your server or rent access to an external one.

  • Hi Michele

    I also use my own mail server, but without authentication and encryption. That's why I did a test with Googles mail server, and the debug output told me essential everything I needed to know to make it work (mostly work on my gmail account).

    Did you review and save plugin settings after upgrade to version 0.5?

    Do you get any errors in the web server's error log if you enable debug (Client and Server)?

  • Hi slyhne,

    I believe there is a small bug - in emailplus.php at Line 104-106

        if ($from_email) {
            $from_email = "noreply@{$domain}";
        }

    Shouldn't it be

        if (empty($from_email)) {
            $from_email = "noreply@{$domain}";
        }

    Otherwise great plugin! Actually I changed that line and now it works for me (I run Elgg under a sublevel - so Mandrill SMTP would not send if the domain (sublevel) does not match with the email domain).

    Cheers,

    reklov

     

  • Hi reklov

    Thank you.

    I will release a new version with the fix soon.

    Regards

    slyhne 

  • Facebook Connect gives an error 

    Fatal error: Call to a member function getSender() on a non-object in /home/user/public_html/mod/emailplus/lib/emailplus.php on line 22

  • Hi,

    actually I came accross a quite similar error like Rohit (not with Facebook connect but with trying to send digest (adopted version of https://elgg.org/plugins/797106/releases/2.1.1#elgg-object-1747017) emails through the emailplus_send_email function.

    function emailplus_send_email($from, $to, $subject, $body, array $params = null) {
    
    ...
    
        $notification = $params['params']['notification'];
        
        $sender = $notification->getSender();
        $recipient = $notification->getRecipient();
        
    ...
    }
    

    Shouldn't it be:

    function emailplus_send_email($from, $to, $subject, $body, array $params = null) {
    
    ...
    
        $notification = $params['params']['notification'];
        
        if (!empty($notification)) {
            $sender = $notification->getSender();
            $recipient = $notification->getRecipient();
        }
        
    ...
    }

    Actually I even don't know if it is necessary. I did not find $sender or $recipient beeing used in the function at all. So maybe those lines need to be removed completely.

  • Hi slyhne,

    I further played around with it. Some further thoughts:

    • In Elgg 2.0.0+ Zend Mail is used instead of php mail(). So the question is, if PHPmailer is the right choice - maybe Zend Mail would be better to use. Elgg 2.0.0 core has still no HTML email functionality (at least I did not find it in core) so the plugin will still be necessary. But maybe it could be also an option to stick with PHPMailer especially to offer a other tool for those who don't want to use Zend mail for any reason.
       
    • Currently it seems to be optimized for notifications. HTML Email Handler is made in a way, that it is open to be used by other plugins (Digest i.e.) as well. Would be great if your plugin goes also in that direction. HTML Email Handler does not offer SMTP or further options right now - so a plus for your plugin :-)

    Hope this is valueable for you. Thanks for your plugin!

    Cheers,

    Reklov

  • Hi Reklov

    Thank you for your thoughts and ideas, they are much appreciated.

    Regards

    Slyhne

  • Hello, My emailplus is sending messages through, but not notifications. How can I get it to send notifications out? 

Stats

  • Category: Communication
  • License: GNU General Public License (GPL) version 2
  • Updated: 2016-1-2
  • Downloads: 1805
  • Recommendations: 4

Other Projects

View slyhne's plugins