Set custom Reply-To in mail sender.
I'm using Mailgun and it recommended to use a new subdomain, like: mg.mydomain.com, so if it gets bad reputation or blacklisted will not affect the main domain mydomain.com
Based on that I have set up all for mg.mydomain.com, the question here is, if I will send the emails from *@mg.mydomain.com, how can I set up custom reply-to property like contact@mydomain.com (the main domain).
6 Replies
Hi @NEROX. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Wasp's email sending API allows you to specify the sender's details (the from field), but based on the available documentation and examples, there is no explicit mention of support for setting a custom Reply-To header when sending emails, including when using the Mailgun provider.
The documented fields for sending an email are: from, to, subject, text, and html. There is no mention of a replyTo or similar field in the API reference or examples for the emailSender.send method or in the emailSender dict configuration in main.wasp Docs: Sending Emails Docs: emailSender dict.
Therefore, based on the current knowledge sources, it is not possible to set a custom Reply-To address (such as contact@mydomain.com) when sending emails via Mailgun in Wasp. If this is a critical feature for your use case, you may want to follow or comment on related feature requests, such as the one for provider-specific options, which could enable more advanced email header customization in the future Github Issue: Provider-specific options.
I'm sorry, but the knowledge sources do not contain enough information to confirm support for custom Reply-To headers in Wasp at this time.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @NEROX, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?
Hey @NEROX, unfortunately not possible with Wasp email system.
We will refactor it to expose much more of the inner mechanisms for each provider.
I've added your question to our issue here:
https://github.com/wasp-lang/wasp/issues/2881
GitHub
Improve Email Sender · Issue #2881 · wasp-lang/wasp
Must Redesign the Email Sender to follow our “onion”/”layers” philosophy Don’t block features of underlying tech (e.g. Sendgrid templates). Rework the email sender to allow users to use any JS base...
I'm also trying to find that option in Mailgun API but I don't see it, btw is not something impossible, ex:

I guess each provider has its own limits on their interfaces.
Don't think wasp would be able to provide more than providers themselves do.
It's possible, but not for email confirmation/request password emails (custom headers needed)
https://gist.github.com/NeroxTGC/4f20a10f41e00d0382003b22331a9049
Aha so it has an
replyTo
fields, that is nice.
Hope we can sort out our email providers system soon.