getgrav / grav-plugin-email

Grav Email Plugin
http://getgrav.org
MIT License
37 stars 29 forks source link

Engine 'mail' regression since release 2.7.0 #68

Closed DjZU closed 7 years ago

DjZU commented 7 years ago

As I could see in the readme, engine 'mail' has been deprecated and it results in a regression for me since release 2.7.0. I retrieved a backup of the 2.6.2 release and it works well. The other two methods don't work for me. Only the engine 'mail' is working in my case. SMTP won't work since my provider is blocking the ports. While sendmail works from SSH, it does not work either from the plugin. Please integrate the engine 'mail' again or I'm stuck with version 2.6.2.

rhukster commented 7 years ago

We use SwiftMailer from Symfony in side the email plugin. This is the most robust and well known PHP mail library: https://swiftmailer.symfony.com/

The regression to stop supporting PHP mailer (which apparently is a unreliable and perhaps a security vulernability) is theirs, and we need to stay on top of the current updates to ensure we have the most bug-free and secure version of this library. The recommendation is to use SMTP, and take the effort to get it to work, you will have a much more reliable email setup if you do so.

Check the Email plugin README.md for examples on setting up a couple of these, and also on how to debug any issues you might have.

DjZU commented 7 years ago

First of all, thank you for your feedback. I'd love to rely on SMTP but my hosting provider (1and1) is blocking the ports 465 and 587. Port 2525 is open and I could successfully use SMTP method with mailtrap.io for testing. With PHP Mailer, I need to replace IsSMTP with IsMail to get it working. Latest SwiftMailer is not working indeed since Mail transport method has been depreciated.

Maybe you can also integrate PHP Mailer library with IsMail method as an alternative to SwiftMailer?

rhukster commented 7 years ago

I think 1&1 does actually support 587 with TLS: https://help.1and1.com/e-mail-and-office-c37589/1and1-mail-basic-c37590/using-the-product-c85088/e-mail-software-setup-credentials-a616889.html

DjZU commented 7 years ago

This is not relevant, it's about configuring your email client to use the email account they provide with the hosting.

I'm using a Port Availabilty Checker script found there: http://hawkee.com/snippet/5404/ When testing with mailtrap, it returns:

The address "smtp.mailtrap.io:465" is closed and cannot be used at this time The address "smtp.mailtrap.io:587" is closed and cannot be used at this time The address "smtp.mailtrap.io:2525" is open and ready to be used

While from my local machine: nc -zv smtp.mailtrap.io 465 returns:

Connection to smtp.mailtrap.io 465 port [tcp/urd] succeeded!

rhukster commented 7 years ago

Frankly I think you just need to change your hosting provider. I've never heard of a provider that locks down legitimate ports for website hosting such as these. Everyone needs the ability to send email reliably. Clearly they are a super budget hosting provider that is not looking out for the needs of their users.

DjZU commented 7 years ago

This is shared hosting... Plus I've seen others threads mentioning similar issues. I'd rather stuck with version 2.6.2 of your plugin or update it and downgrade the SwiftMailer library.

DjZU commented 6 years ago

Solved! Using the email account they provide with these parameters:

SMTP Server : smtp.1and1.com SMTP port : 25 SMTP encryption : none

Note that I also had to update my password to a safer one according to some newer and stronger requirements I was not advised about.