Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emails with AlternateViews #3

Open
brendanmckenzie opened this issue May 25, 2012 · 1 comment
Open

Emails with AlternateViews #3

brendanmckenzie opened this issue May 25, 2012 · 1 comment

Comments

@brendanmckenzie
Copy link

Hello,

Was wondering if you've had any thoughts on how to address the issue with messages that have Alternate Views?

Brendan

@dmcgiv
Copy link
Owner

dmcgiv commented May 26, 2012

DKIM.Net hacks the sending process to get the formatted text so that it can sign the formatted text - attempting to sign the text before formatting would result in an invalid signing. For this to work the formatting process needs to be deterministic - getting the same output every time you use the same input. Unfortunately the formatting process in System.Net.MailWriter is only deterministic if boundaries are not used as the boundary is set to a new Guid each time. Alternative Views and attachments use boundaries and so therefore it's not possible to sign such emails with this code.

The only workaround is to use this code to sign the email and then use another means to send the email other then the built in SMTP client. You could use Amazon's SES service (which I originally wrote the code for) or an alternative .Net SMPT component that allows you to write raw streams.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants