MailBuilder.EnvelopeFrom
sets the email header only. It doesn't change the conversation with SMTP server in any way.
When email is send by Mail.dll, SMTP envelope (SMTP's MAIL FROM command) value is, by default, taken from From
/Sender
fields.
You can explicitly set the MailBuilder.Sender
field (it will also add a "Sender:" header to your message)
-or-
use SmtpMail
to set SMTP envelope without adding any header to your email:
IMail email = new MailBuilder().Create();
SmtpMail smtpMail = SmtpMail.CreateFrom(email);
smtpMail.From = "envelopeFromaddress@agilitec.nl";
using (Smtp client = new Smtp())
{
smtp.Connect("smtp.wiki.net");
smtp.UseBestLogin("user", "password");
smtp.SendMessage(smtpMail);
smtp.Close();
}