Send and receive emails in minutes.

Send an email with one line of Python"",subject="Welcome",text="Hello from Anvil!")

Loading video...

Anvil in one minute

The easiest way to send and receieve emails

Anvil lets you send and receive emails with just a few lines of Python.

It’s free to use – give it a try:

Receive emails with Python

To receive emails with Python, all you need to do is decorate a function as
def handle_incoming_email(msg):
  # Reply to the email
  msg.reply(text="Thank you for your message.")

Learn more about receiving emails with Python by building a disposable email service:

Store emails and attachments in your database

It’s simple to save incoming emails and attachments in your database.

This function handles incoming emails, sends an automatic reply, and stores messages and attachments in Anvil’s built-in database:
def receive_emails():
  # auto-respond to the incoming email
  msg.reply(text="Thank you for your message.")

  # Store the email in your database
  msg_row = app_tables.received_messages.add_row(
  # Store the attachment(s) in your database
  for a in msg.attachments:

See an example that lets you upload a photo and emails it to someone:

Try it for yourself

Anvil is free to use – give it a try:

You can also read more about Anvil in the reference docs.

Here are some example apps to get you started: