Unable to send welcome emails

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:


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


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 version: 15.0.14
Operating system and version: Ubuntu 16.04
Apache or nginx version: Apache 2.4.25
PHP version:7.1

The issue you are facing: I am unable to send welcome emails.

Is this the first time you’ve seen this error? (Y/N):N

Steps to replicate it:

  1. Right click a user while you are logged in as Admin
  2. Click resend welcome email.
  3. You will get a notification saying that sendmail failed.

The output of your Nextcloud log in Admin > Logging:

Swift_TransportException: Expected response code 220 but got an empty response

Here is the log from the error:

[settings] Error: Swift_TransportException: Expected response code 220 but got an empty response at <<closure>>

 0. /var/www/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php line 358
    assertResponseCode("", [220])
 1. /var/www/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php line 147
 2. /var/www/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php line 65
 3. /var/www/nextcloud/lib/private/Mail/Mailer.php line 180
    send(Swift_Message {}, [])
 4. /var/www/nextcloud/settings/Mailer/NewUserMailHelper.php line 169
    send(OC\Mail\Message {})
 5. /var/www/nextcloud/apps/provisioning_api/lib/Controller/UsersController.php line 915
    sendMail(OC\User\User {}, OC\Mail\EMailTemplate {})
 6. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 166
 7. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 99
    executeController(OCA\Provisioning ... {}, "resendWelcomeMessage")
 8. /var/www/nextcloud/lib/private/AppFramework/App.php line 118
    dispatch(OCA\Provisioning ... {}, "resendWelcomeMessage")
 9. /var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    main("OCA\\Provisioni ... r", "resendWelcomeMessage", OC\AppFramework\ ... {}, {userId: "User ... "})
10. <<closure>>
    __invoke({userId: "User ... "})
11. /var/www/nextcloud/lib/private/Route/Router.php line 297
    call_user_func(OC\AppFramework\ ... {}, {userId: "User ... "})
12. /var/www/nextcloud/ocs/v1.php line 82
    match("/ocsapp/cloud/u ... e")
13. /var/www/nextcloud/ocs/v2.php line 24

POST /nextcloud/ocs/v2.php/cloud/users/User/welcome

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


Just one question. Why are you using version 15.0.14? Current version is already 19.0.1.

We are in the middle of planning our upgrade, but it will a while before it goes into production.

That sounds like it is a larger (and professionally used) instance - I’d recommend to get a support contract with Nextcloud GmbH or one of their partners to solve your issues.

1 Like

This instance in question is only being used by 5 or 6 people at most. We cannot afford a pro license.

other than resending welcome email everything would work? no unsolved setup-errors/hints, email"server" setup works without flaws?

Well, after doing more research, it looks like it is unable to send any emails at all, but other than that, the software works fine.

these two questions seem to be unanswered, still…

  • have you setup your email"-server" in NC correctly?
  • are there further unsolved setup-mistakes, that need to be solved?

How would I check that? What configuration file should I look in?

It’s a section in your “basic settings” tab of the admin interface. There you also have the option to send a test mail after confiuring your SMTP credentials.

1 Like

lookilooki here --> https://your.uld.here/settings/admin/overview

aaaaaand you wanna look here, i guess - under email-server
–> https://your.url.here/settings/admin

If it is your own e-mail server you can check the other side as well. Perhaps the mails are rejected for some reason (ip range, content-scanner etc.). I have seen problems in the past with such directly sent mails and made better experience by passing through sendmail (you can use ssmtp if you just want to sent out mails).
Also the large mail providers have sometimes very opaque mail blocking and filtering rules.