Reputation: 1
I am trying to send an email using c# MailMessage to a hotmail account but the emails are always going to junk.
How can i send emails directly to hotmail inbox in c#?
I don't have my own smtp server, therefore i have tried using my university smtp and other smtps like google, yahoo... but all emails were sent to junk.
Any solutions?
Upvotes: 0
Views: 1834
Reputation: 8550
This is not really a C# question.
Mails are sent to spam depending on their content and their headers so you should check a few things :
Using these strategies should help your email not being classified as spam.
You can always check the headers of one of the mail that went into spam. It is often described what rules were applied and where the mail failed.
Upvotes: 2
Reputation: 15685
You can't do it from C#. It is up to the recipient to route the messages to junk or inbox or wherever it decides to put the message. If the sender were allowed to decide where the message went on the client's side, imagine how much bigger of a problem spam would be.
One solution you can employ is to have your target mail account 'whitelist' the sender, but that may not be an option in all cases.
Upvotes: 0
Reputation: 14906
Although it may well be out of your control, junk email filters generally work on a weighting system, so there are things that you can do to make your email look less like spam.
To start with, check that:
If those are all fine, have a look through this list, this article on live.com and the Policies, Practices and Guidelines for Hotmail.
Upvotes: 1
Reputation: 8511
What is the content of your mail, is it text that is likely to be regarded as junk mail by spam filters? Have you tried sending to other accounts such as Yahoo or Gmail?
Upvotes: 0
Reputation: 144
In hotmail, open the Junk folder, click on the message. Hotmail will display options in the body of the message - click on "Wait, it's safe!" Hotmail will move the message to your inbox, and mark the FROM email address as safe.
There is (probably) nothing wrong with your code - it is hotmail identifying the sender and/or subject as being junk.
Upvotes: 1