Can the SmtpClient.Send() method from System.Net.Mail really not send to email addresses that have plus symbols in them? I am sending to a list of email addresses and they all get sent except the ones that contain a plus (+) symbol. Any ideas or workarounds?
可以从System.Net发送()方法。邮件真的不发送给有加号的电子邮件地址吗?我正在发送一个电子邮件地址列表,除了包含+(+)符号的邮件外,它们都将被发送。任何想法或解决方案?
1 个解决方案
#1
2
I successfully send emails to recipients with a + char in the address using System.Net.Mail
with .net 4.
我成功地使用System.Net将邮件发送给地址中带有+ char的收件人。邮件与。net 4。
In my case, the recipients are gmail addresses, where the + and any chars after it don't change the recipient. So something+somethingelse@gmail.com
sends an email that is received by the something@gmail.com
account. But that account can see that it was sent to something+somethingelse
.
在我的例子中,收件人是gmail地址,在这里,+和任何字符都不会改变收件人。所以something+somethingelse@gmail.com会发送一封邮件给something@gmail.com账户。但是那个账户可以看出它被发送给了某物+某物。
I think this is actually a sendmail standard, not just google stuff. It comes in handy.
我认为这实际上是一个sendmail标准,而不仅仅是谷歌之类的东西。它方便。
EDIT: I found some sendmail documentation on "plussed accounts":
编辑:我找到了一些关于“已注册账户”的sendmail文档:
http://www.sendmail.com/sm/open_source/docs/m4/misc_features.html
http://www.sendmail.com/sm/open_source/docs/m4/misc_features.html
Sometimes it is convenient to merge configuration on a centralized mail machine, for example, to forward all root mail to a mail server. In this case it might be useful to be able to treat the root addresses as a class of addresses with subtle differences. You can do this using plussed users. For example, a client might include the alias:
有时,在集中的邮件机器上合并配置是很方便的,例如,将所有根邮件转发到邮件服务器。在这种情况下,可以将根地址作为具有细微差别的地址类处理。您可以使用plussed用户来实现这一点。例如,客户端可能包含别名:
root: root+client1@server
根:根+ client1@server
On the server, this will match an alias for "root+client1". If that is not found, the alias "root+*" will be tried, then "root".
在服务器上,这将匹配“root+client1”的别名。如果没有找到,将尝试别名“root+*”,然后尝试“root”。
#1
2
I successfully send emails to recipients with a + char in the address using System.Net.Mail
with .net 4.
我成功地使用System.Net将邮件发送给地址中带有+ char的收件人。邮件与。net 4。
In my case, the recipients are gmail addresses, where the + and any chars after it don't change the recipient. So something+somethingelse@gmail.com
sends an email that is received by the something@gmail.com
account. But that account can see that it was sent to something+somethingelse
.
在我的例子中,收件人是gmail地址,在这里,+和任何字符都不会改变收件人。所以something+somethingelse@gmail.com会发送一封邮件给something@gmail.com账户。但是那个账户可以看出它被发送给了某物+某物。
I think this is actually a sendmail standard, not just google stuff. It comes in handy.
我认为这实际上是一个sendmail标准,而不仅仅是谷歌之类的东西。它方便。
EDIT: I found some sendmail documentation on "plussed accounts":
编辑:我找到了一些关于“已注册账户”的sendmail文档:
http://www.sendmail.com/sm/open_source/docs/m4/misc_features.html
http://www.sendmail.com/sm/open_source/docs/m4/misc_features.html
Sometimes it is convenient to merge configuration on a centralized mail machine, for example, to forward all root mail to a mail server. In this case it might be useful to be able to treat the root addresses as a class of addresses with subtle differences. You can do this using plussed users. For example, a client might include the alias:
有时,在集中的邮件机器上合并配置是很方便的,例如,将所有根邮件转发到邮件服务器。在这种情况下,可以将根地址作为具有细微差别的地址类处理。您可以使用plussed用户来实现这一点。例如,客户端可能包含别名:
root: root+client1@server
根:根+ client1@server
On the server, this will match an alias for "root+client1". If that is not found, the alias "root+*" will be tried, then "root".
在服务器上,这将匹配“root+client1”的别名。如果没有找到,将尝试别名“root+*”,然后尝试“root”。