Using SendMail to email a group of teachers

I use Mathematica to schedule and organize a piano competition with about 250 students and 80 teachers. I would like to use SendMail to send out the results, but have had no luck hooking up with gmail. I heard that Wolfram Cloud is a possibility, but don’t know what I need to do. Could someone please point me in the right direction?

Thanks,
Kevin

From the documentation for SendMail:

On desktop systems, SendMail requires certain user mail settings. These can be defined through Preferences > Internet & Mail > Mail Settings in the notebook front end or by using SetOptions[SendMail,MailSettings]. SendMail will attempt to send email via the Wolfram Cloud if these settings have not been provided.

Thanks. I tried that, but gmail blocks the connection. I think because of the two factor id. I would like to use the Wolfram Cloud as an alternative, but I guess I need an account? Not sure where to go.
Kevin

Hi Kevin,

Using SendMail through my Gmail account works fine with 2FA. Check the settings in Mathematica. Use your Gmail address in the Username and From Address boxes.

Then set up an “app password” as described here. For “App” choose “Other” and enter whatever name you want. I used Wolfram. Copy the password generated and save it in your password manager or other secure location. To test

SendMail["wlmailtest@wolfram.com", "Here is the body of the message."]

A dialog box will pop up, enter the app password generated above.

If that does not work, please share the code you evaluated and the error message displayed.

Thanks, I will try it again.