-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: NEXTCLOUD 26 Email Setup no Test successfully #37329
Comments
hello, is here any workarround to be able sending mails again? |
no i do not need it, it has neven been checked. |
btw the dropbox on authmethod is not working. |
I can reproduce |
can you elaborate? |
I can confirm that the error log message Undefined array key "mail_smtpauthtype" at /var/www/nextcloud/apps/settings/templates/settings/admin/additional-mail.php#132 also occur when using sendmail as smtpmode! Having this config: my config from that is:
Sending Testmails is working but the error is logged. Also logged at startup of NC Server as well. First time i saw this error was today after updating NC from 25.0.4 to 26.0.0 |
This comment was marked as outdated.
This comment was marked as outdated.
didnt work after setting your recommendation |
Sorry, wrong config param. There's an isset check missing in the template. I've pushed a fix, but let me test some more. |
We moved to symfony mailer for 26. Unfortunately it looks like I've missed a check on the mail_smtpauthtype here. Since this param isn't used any longer, it also isn't passed from the config to the template, so setting it in the backend won't help after all. Fix is linked above. You can patch your instance via the instructions here if it's very intrusive to you to have that error message: |
i am sorry, i am unable to understand the latest comment. |
Yes, there is. You take this link: https://github.com/nextcloud/server/pull/37340.diff download the file and follow the information in this link: https://docs.nextcloud.com/server/latest/admin_manual/issues/applying_patch.html#patching-apps on how to patch your instance. This will fix the issue. The fix itself will be released with 26.0.1. |
sorry i have patched my system, error still appears while hitting send mail |
i have reloadet nginx and cleared my cache, it does not send an mail, issue like descrived |
Iam sorry issue is still not solved. |
nothing in the log. | Undefined array key "mail_smtpauthtype" at /var/www/nextcloud/apps/settings/templates/settings/admin/additional-mail.php#132 after raising debug level i got this: it seems it wants startls but i have not configured starttls |
I had to apply the fix from #37329 (comment) to be able to send emails. |
using port 25 and no login nor encryption is not an option for my config .. |
@come-nc @miaulalala |
@punkyard are you saying 25 without auth is NOT working for you? |
hi @skjnldsv |
I can confirm that the above mentioned workaround in the config does solve the problem for the "port 25/noauth"-case too. |
I was getting the error:
Enabling The cert can be obtained by running:
See |
I can confirm that version 26.0.3 does not fix the issue yet. |
I upgraded NC docker from 26.0.1 to 26.0.3 and the mail stopped working.
I confirm too that the workaround by @MR-Welk solved the issue. |
I can confirm that version 26.0.4 does not fix the issue yet. |
'mail_smtpauthtype' => 0 |
Can you clarify which issue you are talking about? Otherwise, there was behavior changes in the mail configuration due to changing the library we are using (not for fun but because it was needed for security and future development). |
You use localhost to connect to your mailserver and most likely your SSL certificate is not valid for localhost. Your mail server advertise support for STARTTLS and with the new library we use it is not possible to avoid it in this case. So either you need a certificate valid for localhost, or you need to use the domain matching the certificate instead of localhost, or you need to add the configuration suggested by MR-Welk which ignores SSL validation.
@sheggy-rin This is not the same problem, you are not using localhost and you say that using STARTTLS does work with your mailserver. I suspect it might be an encryption configuration which is not supported anymore by the new library but it might also be a bug, you can open a bug ticket on the subject if you need, but in this case provide as many details as possible, especially look if you get log entries related to the connection attempt in the logs. Maybe enable debug logging before attempting the connection to get more logs and disable it after. |
@come-nc, thank you for your answer |
Hi @come-nc Thanks. |
i have this issue in the AIO V28 it was working fine before this 28 update |
Yes, so am i, same f**** issue with 29.0.0.2 No reco here are functioning In the logs (debug) i see :
I do not want to open 25 port Can we reopen this please ? Here is my config.php file for email :
Many thanks for those who can help |
You've got a connection timeout, not a code issue. Can you PING the domain? Is port 578 open? Can you connect from any other client and send emails? |
I been dealing with this for a while it be nice for them to get it to work . Right now I can’t even update AIO as all the apps don’t work and crashes so I am still on v 28
Sent from Yahoo Mail for iPhone
On Tuesday, June 25, 2024, 6:20 AM, Anna ***@***.***> wrote:
Yes, so am i, same f**** issue with 29.0.0.2 Trying to solve since 2 days now
No reco here are functioning
In the logs (debug) i see :
TransportException
Connection could not be established with host "smtp.domain.com:587": stream_socket_client(): Unable to connect to smtp.domain.com:587 (Connection timed out)
Sending mail to "Array ( ***@***.*** => ncc_login ) " with subject ".........................." failed
I do not want to open 25 port Tried also with 465, but no success
Can we reopen this please ? Where can we find other logs ?
Here is my config.php file for email :
'mail_smtpmode' => 'smtp',
'mail_sendmailmode' => 'smtp',
'mail_from_address' => 'info',
'mail_domain' => 'domain.com',
'mail_smtpport' => '587',
'mail_smtphost' => 'smtp.domain.com',
'mail_smtpstreamoptions' =>
array (
'ssl' =>
array (
'allow_self_signed' => true,
'verify_peer' => false,
'verify_peer_name' => false,
),
),
'mail_smtptimeout' => 30,
'mail_smtpauth' => 1,
'mail_smtpname' => ***@***.***',
'mail_smtppassword' => 'PASSWD',
'mail_smtpdebug' => true,
'loglevel' => 0,
Many thanks for those who can help
You've got a connection timeout, not a code issue. Can you PING the domain? Is port 578 open? Can you connect from any other client and send emails?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
On 2024/6/23 02:17, ayoahha wrote:
Yes, so am i, same f**** issue with 29.0.0.2
Trying to solve since 2 days now
No reco here are functioning
In the logs (debug) i see :
TransportException
Connection could not be established with host "smtp.domain.com:587": stream_socket_client(): Unable to connect to smtp.domain.com:587 (Connection timed out)
Sending mail to "Array ( ***@***.*** => ncc_login ) " with subject ".........................." failed
I do not want to open 25 port
Tried also with 465, but no success
Can we reopen this please ?
Where can we find other logs ?
Here is my config.php file for email :
'mail_smtpmode' => 'smtp',
'mail_sendmailmode' => 'smtp',
'mail_from_address' => 'info',
'mail_domain' => 'domain.com',
'mail_smtpport' => '587',
'mail_smtphost' => 'smtp.domain.com',
'mail_smtpstreamoptions' =>
array (
'ssl' =>
array (
'allow_self_signed' => true,
'verify_peer' => false,
'verify_peer_name' => false,
),
),
'mail_smtptimeout' => 30,
'mail_smtpauth' => 1,
'mail_smtpname' => ***@***.***',
'mail_smtppassword' => 'PASSWD',
'mail_smtpdebug' => true,
'loglevel' => 0,
Many thanks for those who can help
If your mail server supports submissions (ie. smtps) , then you
could try port 465.
|
I finally got mine working
Did you go into the config.php and add the needed rows to allow self signed certs
Sent from Yahoo Mail for iPhone
On Wednesday, June 26, 2024, 7:25 AM, SuperdukeGates ***@***.***> wrote:
On 2024/6/23 02:17, ayoahha wrote:
Yes, so am i, same f**** issue with 29.0.0.2
Trying to solve since 2 days now
No reco here are functioning
In the logs (debug) i see :
TransportException
Connection could not be established with host "smtp.domain.com:587": stream_socket_client(): Unable to connect to smtp.domain.com:587 (Connection timed out)
Sending mail to "Array ( ***@***.*** => ncc_login ) " with subject ".........................." failed
I do not want to open 25 port
Tried also with 465, but no success
Can we reopen this please ?
Where can we find other logs ?
Here is my config.php file for email :
'mail_smtpmode' => 'smtp',
'mail_sendmailmode' => 'smtp',
'mail_from_address' => 'info',
'mail_domain' => 'domain.com',
'mail_smtpport' => '587',
'mail_smtphost' => 'smtp.domain.com',
'mail_smtpstreamoptions' =>
array (
'ssl' =>
array (
'allow_self_signed' => true,
'verify_peer' => false,
'verify_peer_name' => false,
),
),
'mail_smtptimeout' => 30,
'mail_smtpauth' => 1,
'mail_smtpname' => ***@***.***',
'mail_smtppassword' => 'PASSWD',
'mail_smtpdebug' => true,
'loglevel' => 0,
Many thanks for those who can help
If your mail server supports submissions (ie. smtps) , then you
could try port 465.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
Bug description
After updating to NC26 from NC25 the Email Test ist not working anymore as before.
Beim Senden der E-Mail ist ein Problem aufgetreten. Bitte überprüfe deine Einstellungen. (Fehler: E-Mail konnte nicht versandt werden. Prüfe dein E-Mail-Server-Protokoll)
It worked since years with the same setup.
Debug Log for smtp is enabled but no output.
Steps to reproduce
Goto Grundeinstellungen Send Test Mail
Expected behavior
success
Installation method
Other Community project
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.1
Web server
Nginx
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Updated to a major version (ex. 22.2.3 to 23.0.1)
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
'mail_from_address' => 'noreply', 'mail_smtpmode' => 'smtp', 'mail_sendmailmode' => 'smtp', 'mail_domain' => 'domain.de', 'mail_smtphost' => 'IP', 'mail_smtpport' => '25', 'mail_smtpdebug' => true,
The text was updated successfully, but these errors were encountered: