This is my SMTP settings in App.Config:
<system.net>
<mailSettings>
<smtp from="Reminder <[email protected]>">
<network host="mail.myserver.net" port="587" password="my password" userName="[email protected]" enableSsl="true"/>
</smtp>
</mailSettings>
</system.net>
And this is how I'm sending the emails:
message.SubjectEncoding = System.Text.Encoding.UTF8;
message.BodyEncoding = System.Text.Encoding.UTF8;
smtpClient.Send(message);
this is working ! but the only problem is, my emails are going to spam folder and that's because they are missing Message-Id in their header. I use the same account in Thunderbird, when I send emails using thunderbird the Message-Id is added to my emails but it's not happening for the emails that are sent from my application.
I can add the header manually with something like :
message.Headers.Add("Message-Id","<3BD50098E401463AA228377848493927-1>");
But this Id is not a valid message-id and I will still get negative spam score for it. Any idea why this is happening ?
This is what I have in Thunderbird:
host: mail.korax.net /
authentication: normal password /
port: 587 /
security: STARTTLS
Your SMTP server has to be configured to automatically include the message ID. If generating your own ID, it should follow RFC 2822 Section 3.6.4.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With