What I’m trying to do:
Send an email using anvil.email.send() but I am getting the following error:
Note: I am not on a trial account and I do use a custom SMTP server that works otherwise. Not changes to it have been made. Emails just stopped working.
anvil.email.SendFailure: 450 Trial accounts can only send emails to the administrator's email. #MS42225 Trial accounts can only send emails to the administrator's email. #MS42225
(SMTPSendFailedException). You have enabled Custom SMTP for email sending - did you configure it correctly? You may need to provide a valid from_address.
What I’ve tried and what’s not working:
It was always working, until today. Now it gives me this confusing error.
Code Sample:
All I do is gather a few details from the user, compile them into a message and then fire off this command on the server
anvil.email.send(
from_name="[Redacted] Emergency Notification",
from_address="emergency@[redacted].com",
to='a working email address',
subject=f"EMERGENCY REPORTED",
text=message
)