Reputation: 20906
MailMessage message = new MailMessage(email.From,
email.To,
email.Subject,
email.Body);
but i can not see name when i get email. I want that instead of "[email protected]" i will get name like "Confirmation" or something else. Can i change email with name in from field in web.config?
<add key="ActivationUserFromEmail" value="'Confirmation' <[email protected]>" />
is not correct XML
Upvotes: 0
Views: 387
Reputation: 4859
Use
message.From = new MailAddress("[email protected]", "Confirmation");
see
http://msdn.microsoft.com/en-us/library/1s17zfkf.aspx
Upvotes: 4