Use SMTP instead of PHP to send mails

Hi,

I'd like to use SMTP instead of PHP to send mails on my multisite installation.

The main reason is that I want my site to send authenticated mails.
I know about Mandrill and it's very interesting but I'd like to do it another way for the moment.

So, my questions now :slight_smile:

How to do it
I've heard about 3 plugins:
https://wordpress.org/plugins/wp-mail-smtp/
https://wordpress.org/plugins/easy-wp-smtp/
https://wordpress.org/plugins/wp-mail-bank/

Actually I found the third one by myself but it looks interesting. And this one is multisite compatible since version 1.3

Do you have any opinion about them?

And what about this one?
https://github.com/rohmann/wp-multisite-smtp
I saw that @Jack Kitterhing is using it and says it works well.

Consequences
If I do this on a multisite installation, it does mean that all emails will be sent through SMTP instead of PHP, right? All emails within the whole multisite network, correct?
What if a user want to use PHP to send mails from his subsite (don't know why he would do that but hey... :slight_smile: )?

And what about everything else? I mean, will there be some consequences I'm not thinking about right now?

Thanks for your help!
Best Regards

  • Wharrf

    Hi Arom,

    Solid question. Just so happened that I had been thinking about this for a while too.

    Given what you have mentioned, My advice is NOT to multisite enable SMTP by default. Instead, you should enable SMTP for each individual site. In that way, you can pre configure the site to send via SMTP by default and then if the user chooses to use PHP mail, he can still do so.

    This will prevent all mail from routing through SMTP.

    for myself, I run a multisite network that I intentionally force all users to use SMTP so I can trace their outbound emails to prevent any spammers. I chose to multisite enable it so there is NO option to change out.

    In general, I prefer to enable plugins individually for each site to provide flexibility to administration

  • Vaughan

    Hi Arom77,

    Hope you're well?

    The info provided by @Buooy above should hopefully have answered your question.

    The exception to the above, is with the plugin https://github.com/rohmann/wp-multisite-smtp

    the above is strictly for global usage, so has to be network activated, which will make SMTP global throughout the network & will not allow setting them on an individual blog basis.

    Hope this helps

  • Arom77

    Thanks @Buooy and @Vaughan :slight_smile:

    @Buooy

    Given what you have mentioned, My advice is NOT to multisite enable SMTP by default. Instead, you should enable SMTP for each individual site. In that way, you can pre configure the site to send via SMTP by default and then if the user chooses to use PHP mail, he can still do so.

    That makes sense. But, really, why on earth would a user want to use PHP mail? I just can't figure it out :slight_smile: Any idea?

    for myself, I run a multisite network that I intentionally force all users to use SMTP so I can trace their outbound emails to prevent any spammers.

    Did you experience any problem since you chose SMTP? Maybe with some plugin?

    Thanks!

  • Wharrf

    er I don't know. No offense, but some clients do like to look knowledgeable by asking for weird requests.

    In general, some of my clients ask to use their own SMTP, so I can't trace their emails. Although I deny their request, I can see where having SMTP activated individually on each site makes sense.

    I haven't had any problems with SMTP yet. I would suggest mandrilll or sendgrid. They are good and the plugin works without error. I do however recall mandrill plugin clashing with some plugins. I can't remember which they were though

  • Arom77

    @Buooy

    Thanks for your advices!

    for myself, I run a multisite network that I intentionally force all users to use SMTP

    Do you use a plugin to do that? Or did you develop your own custom solution?

    Other questions:

    - If I set SMTP mails only for main site:
    That means that all automatic mails that are sent for every subsite will be sent through PHP mail, right? So recipients will get unauthenticated mails (= with phishing alert), correct?

    - What about the e-newsletter plugin?
    If I force all users to use SMTP, users will still SEE a choice between SMTP and php mail (in e-newseller settings / outgoing email settings) but actually the choice wouldn't exist because in the end that would be SMTP anyway, right?
    Any other consequence about the e-newsletter plugin?

    Cheers

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.