سؤال

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?

هل كانت مفيدة؟

المحلول

I successfully send emails to recipients with a + char in the address using System.Net.Mail with .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.

I think this is actually a sendmail standard, not just google stuff. It comes in handy.

EDIT: I found some sendmail documentation on "plussed accounts":

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:

root: root+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".

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top