从 Mailhog 发送邮件到 Gmail 但 gmail 收不到邮件
Send mail from Mailhog to Gmail but gmail can't receive mail
我尝试在 mailhog
中使用 api
得到/api/v1/messages
[
{
"ID": "ZOif6IQhqZgViFi2HO4e8KBSJBAzlwwJ-92rCBccNU8=@mailhog.example",
"From": {
"Relays": null,
"Mailbox": "developer-send-mail",
"Domain": "gmail.com",
"Params": ""
},
"To": [
{
"Relays": null,
"Mailbox": "developer-recv-mail",
"Domain": "gmail.com",
"Params": ""
}
],
"Content": {
"Headers": {
"Message-ID": [
"ZOif6IQhqZgViFi2HO4e8KBSJBAzlwwJ-92rCBccNU8=@mailhog.example"
],
"Received": [
"from smtp.gmail.com by mailhog.example (MailHog)\r\n id ZOif6IQhqZgViFi2HO4e8KBSJBAzlwwJ-92rCBccNU8=@mailhog.example; Mon, 22 Nov 2021 18:30:16 +0000"
],
"Return-Path": [
"<developer-send-mail@gmail.com>"
]
},
"Body": "test my message\r\nnew1\r\nmulti line",
"Size": 33,
"MIME": null
},
"Created": "2021-11-22T18:30:16.822037969Z",
"MIME": null,
"Raw": {
"From": "developer-send-mail@gmail.com",
"To": [
"developer-recv-mail@gmail.com"
],
"Data": "test my nessaje\r\nnew1\r\nmulti line",
"Helo": "smtp.gmail.com"
}
},
]
和我
Post /api/v1/messages/ZOif6IQhqZgViFi2HO4e8KBSJBAzlwwJ-92rCBccNU8=@mailhog.example/release
正文
{
"Host": "smtp.gmail.com",
"Port": "587",
"Username": "developer-send-mail@gmail.com",
"Password": "MyMailPassword",
"Mechanism": "PLAIN",
"Email": "developer-send-mail@gmail.com"
}
响应代码:200
但在 gmail 中 developer-recv-mail@gmail.com 无法收到此电子邮件
在发布端点的 post 值中,您指定 Email
值 developer-send-mail@gmail.com
。既然这个值是收件人,我相信从声音上看应该是developer-recv-mail@gmail.com
吧?
https://github.com/mailhog/MailHog/blob/master/docs/APIv1.md#post-apiv1messages-message_id-release
我尝试在 mailhog
中使用 api
得到/api/v1/messages
[
{
"ID": "ZOif6IQhqZgViFi2HO4e8KBSJBAzlwwJ-92rCBccNU8=@mailhog.example",
"From": {
"Relays": null,
"Mailbox": "developer-send-mail",
"Domain": "gmail.com",
"Params": ""
},
"To": [
{
"Relays": null,
"Mailbox": "developer-recv-mail",
"Domain": "gmail.com",
"Params": ""
}
],
"Content": {
"Headers": {
"Message-ID": [
"ZOif6IQhqZgViFi2HO4e8KBSJBAzlwwJ-92rCBccNU8=@mailhog.example"
],
"Received": [
"from smtp.gmail.com by mailhog.example (MailHog)\r\n id ZOif6IQhqZgViFi2HO4e8KBSJBAzlwwJ-92rCBccNU8=@mailhog.example; Mon, 22 Nov 2021 18:30:16 +0000"
],
"Return-Path": [
"<developer-send-mail@gmail.com>"
]
},
"Body": "test my message\r\nnew1\r\nmulti line",
"Size": 33,
"MIME": null
},
"Created": "2021-11-22T18:30:16.822037969Z",
"MIME": null,
"Raw": {
"From": "developer-send-mail@gmail.com",
"To": [
"developer-recv-mail@gmail.com"
],
"Data": "test my nessaje\r\nnew1\r\nmulti line",
"Helo": "smtp.gmail.com"
}
},
]
和我
Post /api/v1/messages/ZOif6IQhqZgViFi2HO4e8KBSJBAzlwwJ-92rCBccNU8=@mailhog.example/release
正文
{
"Host": "smtp.gmail.com",
"Port": "587",
"Username": "developer-send-mail@gmail.com",
"Password": "MyMailPassword",
"Mechanism": "PLAIN",
"Email": "developer-send-mail@gmail.com"
}
响应代码:200
但在 gmail 中 developer-recv-mail@gmail.com 无法收到此电子邮件
在发布端点的 post 值中,您指定 Email
值 developer-send-mail@gmail.com
。既然这个值是收件人,我相信从声音上看应该是developer-recv-mail@gmail.com
吧?
https://github.com/mailhog/MailHog/blob/master/docs/APIv1.md#post-apiv1messages-message_id-release