0

When a customer buys an item, the button should send an email to the website owner. Here is the code I currently have:

 SmtpClient smtpClient = new SmtpClient("smtpout.europe.secureserver.net", 80);

        smtpClient.Credentials = new System.Net.NetworkCredential("info@furkantellioglu.com      ", "Password");
        smtpClient.UseDefaultCredentials = true;
        smtpClient.DeliveryMethod = SmtpDeliveryMethod.Network;
        smtpClient.EnableSsl = true;
        MailMessage mail = new MailMessage();
        mail.Body = "Bekleyen Siparişleriniz Bulunmakta Lütfen Kontrol Ediniz.";
        mail.Subject = "Dermabon Web Satış";
        mail.IsBodyHtml = true;

        mail.From = new MailAddress("info@furkantellioglu.com", "Sipariş");
        mail.To.Add(new MailAddress("info@furkantellioglu.com"));
        mail.CC.Add(new MailAddress("f.tellioglu@gmail.com"));

        smtpClient.Send(mail);

But when I run it I get this error:

An exception of type 'System.Net.Mail.SmtpException' occurred in System.dll but was not handled in user code

Additional information: Sunucu güvenli bağlantıları desteklemiyor.

Any ideas on what this means?

Blunderfest
  • 1,854
  • 1
  • 28
  • 46

3 Answers3

0

the error message means the server does not support secure connections. Your are using enable ssl but sending to port 80 so there could be a conflict here.

hairmot
  • 2,975
  • 1
  • 13
  • 26
0

seems like a port error, try using changing EnableSsl=false; and or UseDefaultCredentials = true; or use port 25

Shaminder Singh
  • 1,283
  • 2
  • 18
  • 31
0

please try changing

 smtpClient.EnableSsl = true;

to

SmtpServer.EnableSsl = false;

a similar thread has been discussed on this forum which might help you Link

Community
  • 1
  • 1
manishsingh2061
  • 521
  • 1
  • 6
  • 13