+1 vote

Sorry to bug you but I’m having a bit of difficulty with something within a VB.net project where we use your Mail.dll to generate the emails.

The problem is that the BCC recipients are showing up in the header when the email is viewed in gmail.

The method we’re using saves the generated emails into a pickup folder ready for the server to grab them and send them out via SMTP (this is our preferred method) however I can see that the BCC recipients will be rendered this way.

I looked at your methods and swapped “save” for “render”, rendering to a byte array, then writing that byte array to an eml file.
However the BCC does not get added to the eml this way.

Is there a way around this, where I can have the BCC saved in the eml, but not visible to the end recipient?

Many thanks!

by

1 Answer

0 votes
 
Best answer

By default IMail.Save() and IMail.Render(Stream) render BCC header,
IMail.Render() doesn't.

Note that with no BCC header message won't be sent to those recipients.
(BCC header is the only place that those recipients are stored)

If your SMTP server is not smart enough to take BCC recipients and
then remove BCC header before sending, you effectively can't use it.

Your options are:
- don't add BCC recipients.
- use Render method IMail.Render(stream, AddressHeaderRenderMode.NoHeader)

by (298k points)
...