+1 vote

I use the Limilabs.Mail.MailBuilder to build the mail.

I've the exception "is not valid mail address" in builder.From.Add(username), because username doesn't contain @.

I need to send mail with amazon aws, and the username format doesn't contain @.
How can I solve it?

Thanks

by

1 Answer

0 votes

You can use one of the MailBox.CreateWithoutValidation overloads:

MailBox m = MailBox.CreateWithoutValidation("hello");

and then

MauilBuilder builder = new MauilBuilder();
builder.From.Add(m);
by (297k points)
...