Mail API - 发送没有端口属性的消息

时间:2022-06-01 18:56:23

I started testing Mail API; All examples I could see require to know port to send a message; and I am just wondering is there a way to send email with Mail API if you don't know port but recipient email only? If so I would be glad to see some snippets in this direction.

我开始测试Mail API;我能看到的所有例子都需要知道端口发送消息;我只是想知道如果你不知道端口但只收到收件人电子邮件,有没有办法用Mail API发送电子邮件?如果是这样,我会很高兴看到这方面的一些片段。

Thanks

1 个解决方案

#1


0  

There are default ports for all the standard email protocols. If your mail server is using the default port (and almost all do), you don't need to specify the port.

所有标准电子邮件协议都有默认端口。如果您的邮件服务器使用默认端口(几乎所有端口都使用),则无需指定端口。

But it sounds like you want to find the mail server to use to send to a particular recipient. That's a completely different issue.

但听起来你想要找到用于发送给特定收件人的邮件服务器。这是一个完全不同的问题。

#1


0  

There are default ports for all the standard email protocols. If your mail server is using the default port (and almost all do), you don't need to specify the port.

所有标准电子邮件协议都有默认端口。如果您的邮件服务器使用默认端口(几乎所有端口都使用),则无需指定端口。

But it sounds like you want to find the mail server to use to send to a particular recipient. That's a completely different issue.

但听起来你想要找到用于发送给特定收件人的邮件服务器。这是一个完全不同的问题。