The discourse-doctor tool can send a test email. This should also be added to the discourse-setup tool. Do a quick email test to verify that the SMTP data that the user entered works BEFORE setting up the whole software stack. As the notes state, it will be inoperative if email isn’t setup right.
This could save a lot of time if the person doing the installation typed even on piece of data in incorrectly.
So it should be possible to do such a test. My concern is that it would have a bunch of false positives and false negatives, but maybe printing a warning if it fails could help some people.
Maybe a better idea would be yet another script (discourse-mail-check?) that would do a quick and dirty test like that if you’re having trouble.
I was just hoping to have the test directly after the user enters the SMTP details. So it sends a test email to an address the user provides and the user is asked if they received the email, if they did, the installation continues. If they did not they can re-test or alter SMTP config and try again.
if you are not using AWS SES for your email server you may have to tweak the script a little but in general I think one or both of these should be helpful for you to verify email before the installation (this is what I did)
while I agree that there should ideally be a way to test the email prior to installation, I think it may actually be preferable to have it shipped as a separate stand-alone script of some sort with Discourse so that you can run it without having to go through the entire setup process, which can take ~10min