0

I have a config file where we have a tag to store email recipients.

<add key="MailTo" value="xyz@aaa.com,problem_here@aaa.com" /> 

the underscore(_) present in the email id is causing it to not be considered when sending out mails. I have tried everything. Nothing seems to work.

P.S: XML version=1.0

GirKarr
  • 1
  • 2

1 Answers1

1

There is nothing wrong with using an underscore within an attribute value in XML.

Your problem must lie elsewhere. For example, the application that processes the XML file may only allow a single email address in the add/@value attribute value.

Note that _ are generally allowed in the local part of an email address.

See also What characters are allowed in an email address?

kjhughes
  • 106,133
  • 27
  • 181
  • 240
  • Hi, But the value section contains around 6-7 email addressees(comma separated), only this address with underscore is not sent to. Hope this info was helpful. – GirKarr Jul 26 '18 at 13:16
  • I can just tell you that it's not a standard XML or a standard email address problem. Maybe someone else will be able to answer wrt limitations/issues with the app reading this config file. Adding the exact error message to your question may help someone else spot the issue. Last thought would be to verify that `problem_here@aaa.com` is reachable via your regular email client. – kjhughes Jul 26 '18 at 13:21