Problem sending SMTP mail; Failed to authenticate on SMTP server

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud 13.0.5 (on prem)
Apache 2.4.1.8
PHP version: 7.0.28-0
Ubuntu 16.04.1

The issue you are facing:
Unable to send email to external recipient when sharing files. SMTP email setup produces error when Send Email test.
“A problem occurred while sending the email. Please revise your settings. (Error: Failed to authenticate on SMTP server with username “nextcloudadmin” using 0 possible authenticators)”

Note: also tried entering domain name in front of username (e.g. domainname/username) same error.

Is this the first time you’ve seen this error? have had this error from the onset of installation

Steps to replicate it:

When I select:
Send Mode: SMTP
Encryption: none
Authentication method: Login
Authentication required: checked
Server address: (my smtp server) PORT 25 (also tried 565)
credentials: my domain admin account and also tried service account for nextcloud

I hit SEND MAIL and I get the following error:

“A problem occurred while sending the email. Please revise your settings. (Error: Failed to authenticate on SMTP server with username “nextcloudadmin” using 0 possible authenticators)”

The output of your Nextcloud log in Admin > Logging:

Error	no app in context	Failed to send share by email: Failed to authenticate on SMTP server with username "rboan.admin" using 0 possible authenticators	5 hours ago
Error	internet_connection_check	GuzzleHttp\Exception\ConnectException: cURL error 7: Failed to connect to www.nextcloud.com port 80: Connection timed out	5 hours ago
Warning	core	Trusted domain error. "207.46.13.244" tried to access using "pscarchive.thesbmgroup.com" as host.	6 hours ago
Warning	core	Login failed: 'rboan.admin' (Remote IP: '10.200.208.71')	6 hours ago
Warning	user_ldap	Bind failed: 49: Invalid credentials	6 hours ago
Warning	core	Trusted domain error. "155.91.28.237" tried to access using "pscarchive.thesbmgroup.com" as host.	9 hours ago
Warning	core	Trusted domain error. "155.91.28.237" tried to access using "pscarchive.thesbmgroup.com" as host.	9 hours ago
Warning	core	Trusted domain error. "155.91.28.237" tried to access using "pscarchive.thesbmgroup.com" as host.	9 hours ago
Warning	core	Trusted domain error. "155.91.28.237" tried to access using "pscarchive.thesbmgroup.com" as host.	9 hours ago
Warning	core	Trusted domain error. "207.46.13.244" tried to access using "pscarchive.thesbmgroup.com" as host.	a day ago
Warning	core	Trusted domain error. "207.46.13.235" tried to access using "pscarchive.thesbmgroup.com" as host.	2 days ago
Warning	core	Trusted domain error. "5.8.10.202" tried to access using "www.group-ib.ru" as host.	2 days ago
Warning	core	Trusted domain error. "5.8.10.202" tried to access using "piratebuhta.cc" as host.	2 days ago
Warning	core	Trusted domain error. "5.8.10.202" tried to access using "darkpro.ws" as host.	2 days ago
Warning	core	Trusted domain error. "5.8.10.202" tried to access using "troyhack.xyz" as host.	2 days ago
Warning	core	Trusted domain error. "5.8.10.202" tried to access using "bhf.io" as host.	2 days ago
Warning	core	Trusted domain error. "157.55.39.138" tried to access using "pscarchive.thesbmgroup.com" as host.	2 days ago
Error	PHP	stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed at /var/www/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php#94	4 days ago
Error	internet_connection_check	GuzzleHttp\Exception\ConnectException: cURL error 28: Operation timed out after 0 milliseconds with 0 out of 0 bytes received	4 days ago
Error	PHP	closedir() expects parameter 1 to be resource, boolean given at /var/www/nextcloud/apps/files_snapshots/lib/SnapshotManager.php#62	4 days ago
Error	PHP	readdir() expects parameter 1 to be resource, boolean given at /var/www/nextcloud/apps/files_snapshots/lib/SnapshotManager.php#56	4 days ago
Error	PHP	Undefined offset: 1 at /var/www/nextcloud/apps/files_snapshots/lib/SnapshotManager.php#48	4 days ago
Error	PHP	Undefined offset: 1 at /var/www/nextcloud/apps/files_snapshots/lib/SnapshotManager.php#48	4 days ago
Error	PHP	ldap_search(): Partial search results returned: Sizelimit exceeded at /var/www/nextcloud/apps/user_ldap/lib/LDAP.php#293	4 days ago
Error	PHP	ldap_search(): Partial search results returned: Sizelimit exceeded at /var/www/nextcloud/apps/user_ldap/lib/LDAP.php#293	4 days ago
Error	PHP	ldap_search(): Partial search results returned: Sizelimit exceeded at /var/www/nextcloud/apps/user_ldap/lib/LDAP.php#293	4 days ago
Error	PHP	ldap_search(): Partial search results returned: Sizelimit exceeded at /var/www/nextcloud/apps/user_ldap/lib/LDAP.php#293	4 days ago
Error	PHP	ldap_search(): Partial search results returned: Sizelimit exceeded at /var/www/nextcloud/apps/user_ldap/lib/LDAP.php#293	4 days ago
Warning	user_ldap	Bind failed: 49: Invalid credentials	4 days ago
Error	PHP	ldap_bind(): Unable to bind to server: Invalid credentials at /var/www/nextcloud/apps/user_ldap/lib/LDAP.php#293	4 days ago
Warning	user_ldap	Bind failed: 49: Invalid credentials	4 days ago
Warning	user_ldap	Bind failed: 49: Invalid credentials	4 days ago
Error	PHP	stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed at /var/www/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php#94	4 days ago
Warning	core	Login failed: 'rboan.admin' (Remote IP: '10.200.208.71')	4 days ago
Error	no app in context	Failed to send share by email: Failed to authenticate on SMTP server with username "sbmgroup\nextcloudadmin" using 0 possible authenticators	4 days ago
Error	PHP	stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed at /var/www/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php#9

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'ocvcnrur6jsy',
  'passwordsalt' => '6w7kXZhwOxJKQZc4gwvG60gcGvxlLZ',
  'secret' => 'NftXqUU5OdTprVTMADJ8MURcUVbpGM64S3D4OnEKXUnCF7dR',
  'trusted_domains' => 
  array (
    0 => '*****',
    1 => '*******',
    2 => '*****',
    3 => '*****',
    4 => '*******',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'overwrite.cli.url' => 'https://**********',
  'dbtype' => 'mysql',
  'version' => '13.0.5.2',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '********',
  'dbpassword' => '********',
  'installed' => true,
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
  'maintenance' => false,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'mail_smtpdebug' => true,
  'mail_smtpmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_from_address' => 'nextcloudadmin',
  'mail_domain' => '*******',
  'mail_smtphost' => '10.1.1.177',
  'mail_smtpport' => '25',
  'theme' => '',
  'loglevel' => 2,
  'onlyoffice' => 
  array (
    'verify_peer_off' => true,
  ),
  'updater.secret' => '$2y$10$O4tXlPsALOt.M9WpaBTdqOqmR9uMoLIkQK.CE8imGWpv9rYmDvhdi',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'nextcloudadmin',
  'mail_smtppassword' => '*******',
);

The output of your Apache/nginx/system log in /var/log/____:

PASTE HERE