Mailgun supports using a Reply-To address through the h:Reply-To parameter (API) and Reply-To: header (SMTP).
However, the Reply-To address must be added to the message by your sending application before submitting the message to Mailgun for processing and delivery.
Understanding The Context
Setting The Scene
You're following all the email best practices including sending from a subdomain with MX records pointing to Mailgun (right?!). Even the From address uses the subdomain to ensure you're DMARC-aligned and ready to pass Sender Address Verification. Perhaps you even have Mailgun Routes set up to process any incoming email arriving to your subdomain.
Nonetheless, you have reasons for needing any replies to return to your personal address (like a @outlook.com address) rather than the address listed in the From field. If only you had... a Reply-To address!
Discerning The Nuance
Mailgun allows you to add Reply-To addresses to your emails, but it's important to note the Reply-To address must be set within the message before your application sends the email to Mailgun for processing and delivery.
Implementing The Solution
Determining Your Sending Method
It's important to confirm whether your application sends email by API or SMTP. Your IT technician, team, or department can confirm the sending method and assist with any needed configuration changes to enable the use of the Reply-To address.
Sending With The API
- If you're using the API natively, you'll need to add the following parameter:
h:Reply-To = 'firstname.lastname@example.org"
- If you're using the API through a framework or plugin, it is possible the h:Reply-To parameter is not supported. As such, we recommend contacting the support team of said application to confirm whether adding the parameter is possible.
Below is an API request that utilizes the h:Reply-To parameter:
curl -s --user 'api:YOUR_API_KEY' \
-F from='Mailgun User <from.addy@YOUR_DOMAIN_NAME>' \
-F email@example.com' \
-F h:Reply-Tofirstname.lastname@example.org' \
-F subject='Howdy!' \
-F text='Testing the awesomeness that is Mailgun!'
Sending With SMTP
- If you're using SMTP with a technically-robust (i.e. high technical complexity) email application, adding the Reply-To header will be possible. The header will appear like so:
- If you're using SMTP with a user-friendly (i.e. low technical complexity) email application, it is possible the Reply-To: header is not supported. As such, we recommend contacting the support team of said application to confirm whether adding the header is possible.
Below is a set of email headers that utilizes the Reply-To: header:
Mailgun by Pathwire has answers! If you still have any concerns or questions, please send us a Support ticket through the Support page within your Mailgun Control Panel. Our Support Team will be happy to assist!