The mailtest option has been removed from Discourse. joshmings noticed its absence after a clean install and was directed to use the admin panel to send test emails instead, as they go through the same routes as other emails riking. However, Kovah pointed out that this approach is not feasible if the admin account cannot be activated due to not receiving the activation email.
As a workaround, riking suggested setting DISCOURSE_NOTIFICATION_EMAIL for SES users or running ./launcher enter app and rake admin:create to create and activate the admin account. codinghorror explained that the domain name of the “from” email is set to the site’s domain name at install time, which should prevent issues with email delivery.
Kovah sought clarification on testing the email system, particularly the SMTP server, but zogstrip confirmed that rake admin:create activates the admin account, making the mailtest function unnecessary Kovah.
Just went through a clean install on Digital Ocean. Bootstrapped and started fine. Went to mailtest app and option isn’t even there?
root@talk:/var/discourse# ./launcher mailtest app
Usage: launcher COMMAND CONFIG [–skip-prereqs]
Commands:
start: Start/initialize a container
stop: Stop a running container
restart: Restart a container
destroy: Stop and remove a container
enter: Use nsenter to enter a container
ssh: Start a bash shell in a running container
logs: Docker logs for container
bootstrap: Bootstrap a container for the config based on a template
rebuild: Rebuild a container (destroy old, bootstrap, start new)
cleanup: Remove all containers that have stopped for > 24 hours
Options:
–skip-prereqs Don’t check prerequisites
–docker-args Extra arguments to pass when running docker
That functionality was ripped out because it didn’t exactly work. Boot it all the way up, and send test emails from the admin panel; those go through the same routes as everything else.
Where are you finding reference to mailtest? We need to excise those. I can think of two places…
Edit: I just cleaned up a whole bunch of old topics referring to old email issues that should not happen with current versions (and/or are covered in the email troubleshooting guide), or are referring to the now removed Mailtest Python script.
You’re quick! Force of habit after installing, checked and saw it on the post-install maintenance section of the install, but you snagged that one too.
But what if you can’t even access the admin panel because you couldn’t activate your admin account after a fresh install because you didn’t got the activation mail?
If you’re using SES, you can set DISCOURSE_NOTIFICATION_EMAIL to set the from address before being able to access the site settings. Or you can ./launcher enter app and run rake admin:create.
Does rake admin:create also activates the account?
It’s not about a domain problem or something else but how am I supposed to test if the system is able to send emails at all, i.e. if the configured SMTP server is working? Or do I understand something wrong with the activation email? I mean the SMTP server has to work if the mail should be send or not?