seblucas / cops

Calibre OPDS (and HTML) PHP Server : web-based light alternative to Calibre content server / Calibre2OPDS to serve ebooks (epub, mobi, pdf, ...)
http://blog.slucas.fr/en/oss/calibre-opds-php-server
GNU General Public License v2.0
1.43k stars 229 forks source link

Sendto issue : SMTP port configuration problem ? #348

Closed hugoheitz closed 6 years ago

hugoheitz commented 7 years ago

I tried to configure COPS to use the SMTP server of my web content provider (1and1) rather than Gmail. I would like to test the subject parameter available in COPS 1.1.

I get this error when I try to send a book. "Le message n'a pas pu être envoyé.Mailer Error: The following From address failed: nnn@yyy : Called Mail() without being connected"

I dont understand why. Maybe there is an issue with the SMTP port ?

I followed this page to configure the parameters. http://assistance.1and1.fr/email-and-office-365-c65618/boite-1and1-email-basic-c65666/logiciels-de-messagerie-c85133/serveurs-popimapsmtp-pour-configurer-une-boite-1and1-email-basicpro-a792332.html

in this page, you see the parameters for the SMTP and specifically the SMTP server port.

Protocole SMTP Identifiant L'adresse e-mail de la Boîte 1&1 Email Basic/Pro (Exemple : aide@1and1aide.fr). Mot de passe Le mot de passe de la Boîte 1&1 Email Basic/Pro. Serveur auth.smtp.1and1.fr Port 465 Type de chiffrage/sécurité SSL ou TLS

Is there a way to configure the SMTP server port in COPS config file ?

Any idea on how to fix that ?

Thanks for your help

ubupl commented 7 years ago

Look at pull requests: #339, #343

horus68 commented 7 years ago

You can link a PR by including the hash sign before the number #343

hugoheitz commented 7 years ago

Thanks for the help. I will test it tonight. I keep you posted.

hugoheitz commented 7 years ago

I was very optimistic. I changed my config file but it still did not work.

How can I log in order to analyze the error ?

ubupl commented 7 years ago

You have to modify also file sendtomail.php. See PR #339

hugoheitz commented 7 years ago

I see that the PR #339 applies when the default port is not correct (for GMX : tls / 587 ). In my situation, I use SSL and port 465. So I dont understand why it doesn't work.

I did the changes in my existing COPS version (syno package, version 1.0.1).

I will try to make the changes in the 1.1.0 version and see if it changes something in the behaviour.

I keep you posted.

ubupl commented 7 years ago

Changes in sendtomail.php (#339) are necessary to consider settings made in config_default.php (#343). I've applied them both and it works for me with GMX server.

polytan02 commented 7 years ago

To be fair, the official encrypted email port is 587. I don't know why people use 465.

hugoheitz commented 7 years ago

I did the changes in my COPS 1.1.0 installation.

This time I get a different error message Le message n'a pas pu être envoyé.Mailer Error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

Any idea ?

hugoheitz commented 6 years ago

OK. After a long time, I decided to change to use GMX smtp server. I did the configuration and it failed. I kept trying and didn't understand why it didn't work. But I got a message inside GMX mail which said that by default POP, SMTP and IMAP are deactivated and that you must enable them manually. So I did and everything works now.

I propose to enhance the configuration file comments to add this information about GMX.

I close this issue.