The "MAIL FROM"
and "RCPT TO"
SMTP commands you see in Wireshark are not the actual mail message content, but SMTP protocol commands. And unlike the "From" and "To" headers in mail message headers, the brackets are actually required in those SMTP commands.
To see the actual message content sent to the SMTP server, instead of calling Smtp.Send(message, "myMailHost")
, try this:
Smtp smtp = new Smtp();
smtp.Connect("myMAilHost");
smtp.LogWriter = new FileLogWriter("smtp-log.txt", LogLevel.Verbose);
smtp.Send(mail);
This will produce a verbose log where you can see the raw data as sent. I have tried this with the hotfix Tomas posted and the brackets are indeed missing from the message data.
However, Gmail still shows the brackets! The only explanation is that either our SMTP server added them, or that Gmail itself added them... I will try sending directly to Gmail as well and report back.
(To make sure the "MAIL FROM"
and "RCPT TO"
play no role in this, I even tried temporarily removing those brackets from our code, but this had no effect at all.)