Docs

Sending Emails

Your widgets can send you emails using Anvil’s Email API. All you have to do is call anvil.email.send().

Here’s the list of parameters for the send() function:

  • from_name - The name associated with the From: address for this email.
  • subject - The subject line for this email.
  • text - The plain-text (no HTML) content for this email. You must specify at least one of ’text’ and ‘html’.
  • html - The HTML content for this email. You must specify at least one of ’text’ and ‘html’.
The example email in the widget owner's inbox

The example email in the widget owner’s inbox

Custom Mail Server

You don’t need to set up a custom mail server or configure SMTP settings when sending emails. We’ve designed it to be as simple as possible out of the box. However, if you’d like to start sending emails your own SMTP server, you can by opening your widget in Anvil and following Anvil’s documentation.


Do you still have questions?

Our Community Forum is full of helpful information and friendly experts.