我已经看到了用于此的API,该API建议添加Reply-To
标头或h:Reply-To
参数。我对标头没有任何经验,所以这可能就是我在此遇到麻烦的原因。
我正在尝试在邮递员中构造请求,并且尝试将Reply-To
作为标头键,将电子邮件作为值,并且我还尝试了不使用该标头,而是使用参数使用h:Reply-To
键,但是当我对要发送的电子邮件单击“答复”时,它总是答复发件人,而不是我的答复地址。
有人可以帮助我吗?
POST /v3/sandboxXXXXba.mailgun.org/messages?from=messages@xxxx.com& to=xxxx1@gmail.com& subject=hello& text=mailgun-test HTTP/1.1
Host: api.mailgun.net
Reply-To: xxxx2@gmail.com
Authorization: Basic xxxx
cache-control: no-cache
Postman-Token: xxxxx
POST https://api.mailgun.net/v3/sandboxXXXX.mailgun.org/messages?from=messages@domain.com&to=me@gmail.com&subject=hello&text=mailgun-test&h:Reply-To=me@gmail.com
aka:
POST /v3/sandboxXXXXX33ba.mailgun.org/messages?from=messages@mydomain.com& to=myaddress@gmail.com& subject=hello& text=mailgun-test& h:Reply-To=myaddress@gmail.com HTTP/1.1
Host: api.mailgun.net
Authorization: Basic xxxxx
User-Agent: PostmanRuntime/7.15.2
Accept: */*
Cache-Control: no-cache
Postman-Token: xxxx
Host: api.mailgun.net
Accept-Encoding: gzip, deflate
Content-Length:
Connection: keep-alive
cache-control: no-cache
答案 0 :(得分:0)
因此它应该是一个表单数据主体参数:
POST /v3/skedda.co/messages HTTP/1.1
Host: api.mailgun.net
Authorization: Basic YX...
User-Agent: PostmanRuntime/7.15.2
Accept: */*
Cache-Control: no-cache
Postman-Token: ...
Host: api.mailgun.net
Accept-Encoding: gzip, deflate
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Length: 781
Connection: keep-alive
cache-control: no-cache
Content-Disposition: form-data; name="from"
postmaster@...com
------WebKitFormBoundary7MA4YWxkTrZu0gW--,
Content-Disposition: form-data; name="to"
a....com
------WebKitFormBoundary7MA4YWxkTrZu0gW--,
Content-Disposition: form-data; name="subject"
link test
------WebKitFormBoundary7MA4YWxkTrZu0gW--,
Content-Disposition: form-data; name="html"
<h1>Hello world</h1>
------WebKitFormBoundary7MA4YWxkTrZu0gW--,
Content-Disposition: form-data; name="h:Reply-To"
notifications@...com
------WebKitFormBoundary7MA4YWxkTrZu0gW--
或邮递员本身