server icon indicating copy to clipboard operation
server copied to clipboard

Cannot send emails using gmail

Open mphslaats opened this issue 8 years ago • 1 comments

Hi,

I am using Nextcloud for quite some time now, and a company asked me to put Nextcloud on one of there servers. So I did the following:

  • Installed latest NAS4Free;
  • Installed The Brig extension;
  • Created a Nextcloud jail with Nextcloud 12.0.4.

When I made a proof of concept I was able to sent email using the following settings: capture

However when I did it on the company's server I got the following error (I translate the sentence because it was in Dutch):

There was a problem sending your email. Check your settings. (Fout: Expected response code 250 but got code "", with message "")

If I check the log I can see the following:

Level App Message Time
Error PHP fgets(): SSL operation failed with code 1. OpenSSL Error messages: error:140943FC:SSL routines:ssl3_read_bytes:sslv3 alert bad record mac at /usr/local/www/apache24/data/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php#163 2017-12-20T18:31:22+0100
Error PHP Narrowing occurred during type inference. Please file a bug report on bugs.php.net at /usr/local/www/apache24/data/nextcloud/lib/composer/composer/ClassLoader.php#444 2017-12-20T18:30:00+0100

Like I said I made a proof of concept in which I am able to send emails with exactly the same settings and resources. However it does not work on the company's server...

mphslaats avatar Dec 20 '17 17:12 mphslaats

I use the exactly same configuration for gmail and it works here. This seems to be related to the SSL implementation of the OS. Please reach out to the maintainer of the PHP to have a look at this. My wild guess is just that some ciphers are not supported somehow.

The second error message is also a PHP bug and was already fixed in PHP itself and only waits for the new release to be made available.

MorrisJobke avatar Dec 22 '17 10:12 MorrisJobke