• Resolved torbent


    I use WPForms together with WP Mail SMTP and I am connected to my Mailgun account via WP Mail SMTP.

    When eMails are sent via Mailgun, the Reply-To is not set to the field from my Form. However, when I remove the Mailgun integration in WP Mail Smtp and send the contact form again, I can clearly see that the Reply-to field is set.

    Does WP Mail SMTP does not set the Reply-To correctly in the Mailgun API connection?


    -> h:X-My-Header h: prefix followed by an arbitrary value allows to append a custom MIME header to the message (X-My-Header in this case). For example, h:Reply-To to specify Reply-To address.


Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Gregor Capuder


    Hi @torbentschechnegmailcom,

    I’ve tested our Mailgun mailer via a contact form with a reply-to field set and the reply-to header was present in the delivered email.

    We are using the h:Reply-To parameter when sending the request to Mailgun.

    Which version of the WP Mail SMTP plugin are you using?
    How did you define the reply-to field in the WPForms plugin?

    Take care!

    Thread Starter torbent


    Hello Gregor,
    I am using 1.9.0 of WP Mail SMTP and of WP Forms.

    The setting in WP Form is just set to this: https://drop.torben.me/Screen-Shot-2020-04-24-08-29-53.png

    I used Mailtrap to capture an email, and I could clearly see that the reply to was set correctly. However in Mailgun I do see this and this puzzles me:

    In the tab MIME type i do see this: https://drop.torben.me/Screen-Shot-2020-04-24-08-32-55.png So here, a reply to is set correctly. But when I look into the message details I do see this:

    	"tags": [],
    	"timestamp": 1587570557.92336,
    	"storage": {
    		"url": "https://sw.api.mailgun.net/v3/domains/xxxxxx.com/messages/U2LAOW9ZA==",
    		"key": "AgEFf5KJKZ60U2LAOW9ZA=="
    	"log-level": "info",
    	"id": "g2Ewt6GvsfZvC6wxQ",
    	"campaigns": [],
    	"user-variables": {},
    	"flags": {
    		"is-routed": false,
    		"is-authenticated": true,
    		"is-system-test": false,
    		"is-test-mode": false
    	"recipient-domain": "xxxxxx.com",
    	"envelope": {
    		"transport": "smtp",
    		"sender": "hallo@xxxxxx.com",
    		"sending-ip": "",
    		"targets": "hallo@xxxxxx.com"
    	"message": {
    		"headers": {
    			"to": "hallo@xxxxxx.com",
    			"message-id": "20200422154904.1.FE172AFC688F784C@xxxxxx.com",
    			"from": "Studio <hallo@xxxxxx.com>",
    			"subject": "Betreff: Bestellung 146317 ergänzen"
    		"attachments": [],
    		"size": 20076
    	"recipient": "hallo@xxxxxx.com",
    	"event": "delivered",
    	"delivery-status": {
    		"tls": true,
    		"mx-host": "aspmx.l.google.com",
    		"code": 250,
    		"description": "",
    		"session-seconds": 5.416873931884766,
    		"utf8": true,
    		"attempt-no": 1,
    		"message": "OK",
    		"certificate-verified": true

    And here no reply-to is mentioned. My customer uses a google group where all of these contact requests are sent to and they say, that hey can’t answer to the emails as there is no reply-to being set.

    Plugin Author Gregor Capuder



    From the above screenshots for WPForms setting, it looks like you have the “from email” and “reply-to” set to the same field {field_id="2"}. Maybe Mailgun just eliminates the “reply-to” header, if it is pointing to the same email address as the “from email”?

    Also, I don’t think you should have the “from email” set to a dynamic email address. The emails should be sent from your registered email address in Mailgun. You can configure that in the WP Mail SMTP plugin settings: define the “from email” (the one registered in Mailgun) and then enable the “force from email” checkbox.

    Have a nice day!

    Hi @torbentschechnegmailcom – We haven’t heard from you in about a week, so I’m going to go ahead and mark this ticket resolved. If you still have questions, though, please feel welcome to continue the conversation

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Mailgun Api – Reply-to not set?’ is closed to new replies.