You can trigger a val to run by sending it an email.

An email handler is a function that accepts an email object as its input.

https://www.val.town/embed/stevekrouse.testEmail2

The email address for @stevekrouse.testEmail2 is [email protected]. Note that the username does not contain a leading @ and that the email domain is valtown.email. You can copy a val’s email address from > Endpoints > Copy email address.

Untitled

You can view all the emails sent to this function here:

https://www.val.town/embed/stevekrouse.testEmails

Test it out yourself by sending an email to [email protected] and your email should show up in this list above.