Customizing the outgoing address in the users service

What I’m trying to do:

I cloned the Expense app to get a run through on using Anvil as an easy project we have had for a while. I am adding the PO/Lookup from our ERP via the uplink service but when I am trying to actually login here and use the users service I can NOT send an email out as a domain that will work?

How do you customize sending the outgoing identity.

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

Normally for this I would set an outgoing generic identity and then point the mail connection to our MX record for our office365 and then just move on from there as this is only for internal use and will always be sending to an internal account we will not need to relay just receive. I also will sometimes add an IP to a receive connector in o365 so it whitelists the app server the amil will come from but looks like anvil emails for a whole slew of address’s.

As a custom email server I can not make this work and using anvil’s email server all the emails are sent as this wacky address: accounts@fedmzfk44xtdjhff.anvil.app

how is this done as a best practice here on this service? as it does not look like I can modify the login form and I am sure I am just missing something simple here.

Welcome to the Forum!

If you haven’t already, you might want to visit this page: Email, especially the one-stop Search box at the top. It searches not only the documentation, but the entire Forum!

Appreciate the response but the issue I have is with customizing the generic outgoing address using the users server. that link does not appear to have any useful information to this. I had looked there before and there is info on sending email in our custom code etc… but nothing on making the simple “password reset” look like it comes from our custom domain.

if we have to use this 90891233981.anvil.app domain then this service will not work for us.

Hi @justin.carlson and welcome to the Forum!

You should be able to customize the Users service emails as described here: Anvil Docs | Configuring Emails

However, I just tested it myself, and editing that outgoing email address doesn’t seem to be working. I’ve raised the issue internally, and we’ll update this thread when it is fixed.

1 Like

I’ve just put a copy of my app onto my custom domain, yet email sent from the app are still coming from the old private link address ( no-reply@bqs3i7bzcsyzuawc.anvil.app) instead of the new custom domain (no-reply@app.sn4pshot.com). This for some reason doesn’t present a problem for the registration/stripe subscription flow, but it does throw an error when trying to reset users passwords.
Looking at the email service it’s showing the app correctly published at https://app.sn4pshot.com

Outgoing emails can be sent from anything@app.sn4pshot.com.

You can receive messages sent to anything@app.sn4pshot.com

However, when I scroll further down it shows:
“My App Support no-reply@bqs3i7bzcsyzuawc.anvil.app
and
“This function will recieve and reply to any address with the bqs3i7bzcsyzuawc.anvil.app domain”
Which is the old private link address.

I found this post with a similar problem here on the forum:

It suggests removing and re-adding the email service, which I have done, but to no effect. I should add I’m using a custom registration/login flow, but the old "bqs3i7bzcsyzuawc.anvil.app address isn’t hardcoded anywhere and all other URL’s instances have been updated to the custom domain.

A previous version of the app was working just fine on this custom domain, but didn’t have any registration/stripe integration and was using the standard Anvil login. This version I have just updated it with was renamed to match the previous version and pointed at the custom domain in the publishing section. Every other aspect is working just fine, however all emails are coming from the old private link and for some reason that doesn’t impede new registrations and re-directs to stripe payment link, but it is impeeding password resets.

Is this a bug or is there perhaps something Anvil have to do on the back end to update this. Anybody have any ideas?

Hi @mail,

I’ve moved your post to the existing thread for this bug.

So, does that suggest that this is an actual bug and not an error of my own making?

Do you think if I create a whole new version of the app and only publish it to the custom domain I can circumvent this issue? As it’s supposed to be live right now, but this issue is preventing me from doing so.

Is there any progress here on this? is there a link to a bugtracker we can monitor?

Thank you : -)