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

Automatically set the date in the WriteTo method #710

Closed
NZ-Jaybird opened this issue May 22, 2018 · 3 comments
Closed

Automatically set the date in the WriteTo method #710

NZ-Jaybird opened this issue May 22, 2018 · 3 comments
Labels
bug Something isn't working

Comments

@NZ-Jaybird
Copy link

Hi Jeffrey

  • Situation: Save email to file using WriteTo
  • Actual behaviour: File does not include Date header
  • Expected behaviour: Date should be set to current timestamp and included in the output
  • Steps: (1) Create new MimeMessage using CreateFromMailMessage (2) WriteTo file

Since I'm not sending the mail over a particular protocol, I guess there's nothing to log, please advise if protocol log is still required.

Note that if I manually set the timestamp before calling WriteTo then it is output.

Also, just wondering if it's possible to omit the day in the Date output as the .NET SmtpClient doesn't include the "Wed, " part when writing the date.

Thank you

Jonathan

@jstedfast
Copy link
Owner

The day string is part of the email standard.

Anyway, turns out this is only an issue with CreateFromMailMessage. Creating a new MimeMessage using MimeKit API's sets the Date header.

@jstedfast jstedfast added the bug Something isn't working label May 23, 2018
@NZ-Jaybird
Copy link
Author

NZ-Jaybird commented May 23, 2018 via email

@jstedfast
Copy link
Owner

No problem :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants