Anvil Email From Domain Not Matching

What I’m trying to do:
I am looking to send and receive emails using one domain address, suppose under the specific address no_reply@anvil-issue-demo.anvil.app

What I’ve tried and what’s not working:
I have:

  1. set up the email capability
  2. published my app and set a unique domain
  3. now I go into the email sending setting and here is what I see:
    (note currently in test mode as I try to work this thing out)

My issue is as you can see, the app receives emails to the domain but does not send them out of that domain. I believe this is a change from what was happening previously. Not sure if this is a setting or a change to the email capability but this is unfortunate.

If I send an email OUT of the app, it is sent from this address: My App Support no-reply@xsqeexbs2gtcz3xv.anvil.app
However, if I send an email back to this address, I do not appear to receive it, as the app only accepts emails to this domain: anything@anvil-issue-demo.anvil.app
This causes lots of issues with the email capability.

I have tried adding this line:
from_address=‘anvil_app@anvil-issue-demo.anvil.app’,
into the email send function but it appears to do nothing.

When you send the emails from code, is that code running in your Published environment? It sounds like not: that you’re instead running that code from the Debug environment, which has a different url, one like the address you’re seeing on the outbound mail.

2 Likes

Hi Tim,

Thank you, that does resolve my issue. I do think it’s a bit confusing and maybe would benefit from a bit of documentation, specifically within the email settings as the examples explicitly say that the emails will send from the debug environment email.

2 Likes