Nextcloud version: 14.0.3
Operating system and version: Debian 8.11
Apache or nginx version: Apache (couldn’t find out more)
PHP version: 7.2.11
The issue you are facing:
unfortunatley I have problems setting up the Email configurations for smtp in the Basic Settings.
I tryed everything I know and don’t know what to do anymore.
I run Nextcloud 14.0.3 on a 1und1 Hosting.
I can send and receive E-Mails by using the same account through other programms like Thunderbird and
I can even access the E-mail account and send E-Mails by smtp through the Nextcloud E-Mail app.
It just doesn’t work with the configuration in the Basic Settings.
The output of your config.php file:
‘app.mail.transport’ => ‘php-mail’,
‘mail_smtpmode’ => ‘smtp’,
‘mail_smtpauth’ => 1,
‘mail_smtpname’ => ‘xx’,
‘mail_smtppassword’ => ‘xx’,
‘mail_smtpsecure’ => ‘tls’,
‘mail_from_address’ => ‘noreply.cloud’,
‘mail_domain’ => ‘xx’,
‘mail_smtpauthtype’ => ‘LOGIN’,
‘mail_smtphost’ => ‘smtp.ionos.de’,
‘mail_smtpport’ => ‘587’,
‘mail_smtptimeout’ => ‘30’,
‘mail_smtpdebug’ => true,
A problem occurred while sending the email. Please revise your settings. (Error: Connection could not be established with host smtp.ionos.de [Connection timed out #110] Log data: ++ Starting Swift_SmtpTransport !! Connection could not be established with host smtp.ionos.de [Connection timed out #110] (code: 0))
It would be very kind if anyone could help.
Try to change the mail_smtpport to 25 (587 does not work with ionos). May be that works.
Gibt es eine Lösung für das 1und1/Ionos-SMTP-Problem?
maybe try using ssl with port 465? … found here: iosnos smtp info
I tried this before … in all combinations, as suggested in another thread.
ssl-587, ssl-465, ssl-25
tls-587, tls-465, tls-25
none-25, none-465, none-587
I usually get the error “connection could not be established with host smtp.ionos.de [connection timed out #110]”
The funny thing: the nextcloud is hosted on Ionos/1and1-webspace as is the mail account … This should work in any way.
Sounds indeed unnormal.
Did you try starttls as well?
You sure you entered all other information correctly? Serveraddress for example?
Does the mailaccount exist? Correctly written?
What is your login method ?
Yes, password correkt … doublechecked, three times, many times …
Yes, of course does the mail account exist. Tested with Thunderbird … everything is fine with it. Correctly written too … checked again and again and also all the other informations.
Yes, I tried starttls (it shows up as “STARTTLS” in the nextcloud admin panel, but in config.php it ist named only “tls”; it seems that there are only the options “ssl”, “tls” and “” in the config.php. If you put “starttls” there, you get “no” in admin panel and the error “Unable to find the socket transport “starttls”” … )
I do not understand the error. Respectively I understand the error in that way, that there is no communication, as if nextcloud would not use the provided information or even would not try to connect. Where can I check this?
alright, I think here is the end of my latin.
And I guess you already tried to copy the settings from thunderbird over to nextcloud…?
I ran some tests against my local server and had problems to send email via SMTP too.
Surprisingly sending email failed although an SSL connection (port 465/tcp) has successfully
been established. STARTTLS also failed because the authentication protocol CRAM-MD5 is
not supported by the Nextcloud function.
I was only able to send email using the sendmail interface. Why are you not using sendmail
to send email? If you haven’t installed an email server on your server, you could e.g. install
and use sSMTP as smtp client which provides a sendmail interface.
I got the system working … in some way:
my provider told me “…port 25 and server smtp.ionos.de resp. smtp.1und1.de are reachable by script …”
So it is working without SSL/TLS or STARTTLS. This lack of security is annoying … I will have to look out for another mail provider (don´t like google or so)
Thank you all for your help and commitment
Sorry to say that, but I think you have misunderstood how SMTP or email works in general.
The whole transmission process is unsecure by default and there is no guaranty that email
is transferred to its endpoint over a TLS secured connection over the Internet.
So looking for an other email provider will not solve the problem. The only way to send email secured is by using e.g. a PGP/GPG or S/MIME encrypted email.
Of course encryption is one important part of security. That prevents the message from being read by unauthorised people.
The other part of security is, to make sure that you and only you are talking to your counterpart and no one is listening what you are talking about. That is the job of TLS and it protects (it should do so) f.ex. ones email account from being missused. That is, what I want to get from my provider. Nothing more, but also not less.
You are right, that there is no way to guarantee that a mailserver uses a secured connection to the next one and so on. From this point of view email is always an unsecure communication.
Thank you for taking the time to update. I was having exactly the same issue on my self-hosted NextCloud installation and the combination of no encryption, ‘Login’ authentication and port 25 solved my problem as well
I’ve tried everything. Including gmail account instead of my hosted ones.
Absolutely no luck. I even tried installing a new instance of nexcloud.
If I try the above suggestions None for encryption and port 25/465/587 I get a huge list of errors to say encryption is required.
Shame there is no way to put phpmail back.
Just figured it out. Ofcourse as soon as my previous post was done. lol.
I could only use an email account that is on the same server as my nextcloud installation.
im Webmailer von IONOS rechst oben auf das Rollo->Accounts->E-Mail-bearbeiten aufrufen und den komischen Benutzernamen unter “Ausgehender Server” verwenden. Das hat bei mir zum Erfolg geführt.
Der hat nichts mit meinem Login zum Webmailer zu tun.!
Viel Erfolg ,-)
Funktioniert das bei Dir noch? Ich habe es genauso eingestellt, bekomme aber immer noch diesen Fehler:
Beim Senden der E-Mail ist ein Problem aufgetreten. Bitte überprüfe Deine Einstellungen. (Fehler: Connection could not be established with host smtp.ionos.de :stream_socket_client(): php_network_getaddresses: getaddrinfo failed: Name or service not known)
so wie Du es eingestellt hast funktioniert es nicht.
Den Unterschied zwischen SSL/TLS und STARTTLS kennst Du?
Bei STARTTLS wird der Server erst einmal gefragt, ob er überhaupt verschlüsselt arbeiten kann und wenn ja, dann wird mit TLS verschlüsselt.
Du musst also unbedingt STARTTLS eintragen, da der Port 25 kein normaler Verschlüsselungport, wie 465 oder 587, ist.
ok, ich habe jetzt STARTTLS eingestellt, trotzdem, gleicher Fehler. Das Passwort ist das Passwort, was ich zum einloggen in den Webmailer benötige oder gibt es da auch noch ein anderes oder eigenes von Ionos, was da irgendwo versteckt in den Einstellung steht?
Ja, das Passwort ist identisch, nicht wie bei T-Online.
Bei mir funktioniert es einwandfrei.
Edit: Reden wir hier von IONOS Webhosting?
mein Emailaccount läuft über Ionos Webmail.