I have a VPS hosting:
a Wordpress website at mywebsite.com
a Nextcloud server at mynextcloud.com/nc
OS: Ubuntu 16.04.5 LTS
Nextcloud version: 126.96.36.199
Server version: Apache/2.4.18
PHP version: 7.0.30
MySQL version: 5.7.23
When logged in as an admin user I can see under Additional Settings the email server settings. These plus the linked documentation on email look simple, but I can’t manage to confirm it’s working.
There won’t be much need for emails but I want them to work if needed. I’d prefer not to use the SMTP option as I don’t want my email login details sitting on the server.
I’ve input a working email address into the admin profile. In the email server settings, I’ve selected PHP and input a From address. I’ve used both a working and a non-existent From address but neither seems to work. I assume the From is not critical to the sending functionality.
If I test it with the Send Email button it appears to work, it confirms Email sent. However no email arrives. I’ve tested the destination address and it works. The same issue happens if I select Sendmail in the options rather than PHP.
The server has sendmail installed and using the contact form on the website of my other domain hosted on the VPS, which uses sendmail, the emails always get through.
I’ve checked the error.log and nothing specific appears there when using the email test.
In the activity log, these entries appear around the time I try to send a test email (IP address removed):
xx.xxx.xxx.xx - - [08/Aug/2018:11:16:23 +0000] "GET /nc/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 200 1372 "-" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36" xx.xxx.xxx.xx - - [08/Aug/2018:11:16:44 +0000] "POST /nc/settings/admin/mailtest HTTP/1.1" 200 1108 "-" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36" xx.xxx.xxx.xx - - [08/Aug/2018:11:16:53 +0000] "GET /nc/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 200 1372 "-" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36"
<?php $CONFIG = array ( 'instanceid' => 'xxxxxxxxxxxxxxxx', 'passwordsalt' => 'xxxxxxxxxxxxxxxx', 'secret' => 'xxxxxxxxxxxxxxxxxx', 'trusted_domains' => array ( 0 => 'mynextcloud.com', ), 'datadirectory' => '/var/www/mynextcloud/nc/data', 'overwrite.cli.url' => 'https://mynextcloud.com/nc', 'dbtype' => 'mysql', 'version' => '188.8.131.52', 'dbname' => 'mydb', 'dbhost' => 'localhost', 'dbport' => '', 'dbtableprefix' => 'oc_', 'mysql.utf8mb4' => true, 'dbuser' => 'mydbusr', 'dbpassword' => 'xxxxxxxxxxxxxxxx', 'installed' => true, 'memcache.local' => '\\OC\\Memcache\\Redis', 'redis' => array ( 'host' => 'localhost', 'port' => 6379, ), 'memcache.locking' => '\\OC\\Memcache\\Redis', 'htaccess.RewriteBase' => '/nc', 'mail_from_address' => 'xxxxxx', 'mail_smtpmode' => 'sendmail', 'mail_smtpauthtype' => 'LOGIN', 'mail_domain' => 'xxxxxxxxx', );
Any suggestions on how to get this working?