I'm writing a server that will send email to many recipients on behalf of my client.
The email must come from the client's email address ([email protected]), but I want to automatically handle bounces via VERP. Basically, the email From:
header will be [email protected], but the SMTP envelope sender (MAIL FROM
) will be unique-email-id@my-email-service.example.com.
I've already built a multi-threaded sending engine that uses the built-in System.Net.Mail.SmtpClient
to actually speak SMTP with the recipient's MX server.
Unfortunately, SmtpClient
does not allow you to specify the envelope sender – it just uses the From:
address.
I need an alternative that allows me to specify the SMTP MAIL FROM
. Preferably, something that takes little work to drop in and replace SmtpClient
.
Thus far, everything I've looked at is an entire email suite (SMTP/POP3/IMAP/kitchen sink). What lightweight SMTP libraries are available?