Click here to Skip to main content
15,068,471 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,

I'am developing a website "www.synergyprosale.com" using asp.net i'am facing a serious strange problem, which is the following:
I'm using smtp email technique in sending email from the website, but the emails are not delivering to hotmail accounts, while they are receiving successfully to other types of accounts as gmail, yahoo,..etc.
The code below was working properly, but without any changes in the code neither in the configuration it stopped sending to hotmail accounts.
Knowing that the user is not getting any error or warning.
Hope you can help me in fixing this issue.

Below you can find my code:

VB
Public Function EmailSending(ByVal mailto_ As String, ByVal mailFrom As String, ByVal subject As String, ByVal body As String) As Boolean
            Dim basicAuthenticationInfo As New System.Net.NetworkCredential("***@synergyprosales.com", "******")
            Dim mail_from As System.Net.Mail.MailAddress = New System.Net.Mail.MailAddress(mailFrom, "Synergy Prosales Company")
            Dim mail_to As System.Net.Mail.MailAddress = New System.Net.Mail.MailAddress(mailto_)
            Dim message As System.Net.Mail.MailMessage = New System.Net.Mail.MailMessage(mail_from, mail_to)
            message.Subject = subject
            message.Body = body

            Dim smtp As New System.Net.Mail.SmtpClient("relay-hosting.secureserver.net")
            smtp.UseDefaultCredentials = false
            smtp.Credentials = basicAuthenticationInfo
            smtp.EnableSsl = false
            smtp.Host = "relay-hosting.secureserver.net"
            smtp.Port = 25
            smtp.Send(message)
            Return True
    End Function


Many thanks in advance.

Best Regards,
Dima
Senior Web Developer
Posted
Updated 23-Feb-15 0:23am
v3
Comments
[no name] 23-Feb-15 7:26am
   
I can recommend Using Enterprise web services solution offered from Microsoft.

But the below URL speaks somehow a solution for the same problem that you have.Please take a look

http://serverfault.com/questions/434703/why-does-hotmail-still-reject-my-emails
[no name] 23-Feb-15 7:35am
   
If you find my answer correct then you can accept it by clicking on the green button to accept the answer.

1 solution

Hi,

Try this..

1) Send e-mail via SMTP using C#
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900