Fix the error of ""Server does not support secure connections. " ?" when sending email

"Server does not support secure connections. " ?

07-13-2009, 7:49 AM

hello

I use password recovery with SMTP. i have error at hosting that "Server does not support secure connections. "
my web.config is below

system.net
mailSettings
smtp deliveryMethod="Network" from="destek@interaktifilan.com"
network defaultCredentials="true" host="mail.interaktifilan.com" port="25" userName="destek@interaktifilan.com" password="****"
smtp
mailSettings
system.net

my hosting say me that "Please do not use Secure connection for SMTP. and Our mail server does not support secure SMTP connections." I dont know where i use secure connections. how can i find it and fix it ?

 

Thanks

 


 

Mark as me if my question or my answer can be helpful for you :)
    • Re: "Server does not support secure connections. " ?

      07-13-2009, 9:07 AM
      Answer
      • Member
        215 point Member
      • nirman.doshi
      • Member since 07-07-2009, 8:07 AM
      • Vadodara
      • Posts 70

      Just do one thing -

      Override "SendingMail" event of your Password recovery control.

      When you create an instance of SmptClient object, it automatically sets its property from the one we gave in web.config.

      So here you will need to write only one statement to disable SSL.

       

      1. protected void pwdRec1_SendingMail(object sender, MailMessageEventArgs e)   
      2. {   
      3.     System.Net.Mail.SmtpClient _smtp = new System.Net.Mail.SmtpClient();   
      4.     _smtp.EnableSsl = false;       
      5. }  


      This should work.

      If doesnt pls reply for further assistance

      Nirman Doshi
      Software Developer
      Vadodara, India
      • Re: "Server does not support secure connections. " ?

        07-13-2009, 10:09 AM

         hello

        pwdRec1 means that my password recover name ?

         

        • protected void pwdRec1_SendingMail(object sender, MailMessageEventArgs e)   
        • {   
        •     System.Net.Mail.SmtpClient _smtp = new System.Net.Mail.SmtpClient();   
        •     _smtp.EnableSsl = false;       
        • }  
        •  

           I also send mail via below code. what should i do for it ?

           Dim mm As New mailgonder()

          mailgonder.mkonusu = String.Format("{0}{7}{1}{7}{2}{7}{3}{7}{4}{7}{5}{7}{6}", "Sayn " + DetailsView2.Rows(0).Cells(1).Text.Trim(), "Mesaj G”nderen : " + User.Identity.Name.ToString, "šrn No: " + DetailsView3.Rows(0).Cells(1).Text.ToString.Trim(), "˜lan BaŸl§: " + baslikL.Text, mesaj, "Sayglarmzla", ("<a href=""http://www.interaktifilan.com"">www.interaktifilan.com</a>"), "<br /><br />")

           

           

          mailgonder.yeni = DetailsView7.Rows(2).Cells(1).Text.Trim().ToString

          mm.gonderim()

          MY CLASS.VB IS BELOW

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

           

          Public

           

          Class mailgonder

           

           

          Public Shared yeni As String = ""

           

           

          Public Shared mkonusu As String = ""

           

           

          Public Sub gonderim()

           

           

          Dim mail As New MailMessage()

           

           

          'set the addresses

          mail.From =

          New MailAddress(destek@interaktifilan.com)

          mail.[To].Add(yeni)

           

           

          mail.Subject = "interaktifilan Yeni mesajnz var"

          mail.Body = mkonusu

          mail.IsBodyHtml =

          True

           

           

           

           

          Dim smtp As New SmtpClient( "mail.interaktifilan.com" )

          smtp.EnableSsl =

          True 'Should i false this line ?

          smtp.Port = 25

           

           

          smtp.Credentials =

          New NetworkCredential("*g", "*******")

          smtp.Send(mail)

           

           

          End

          Sub

          End

           

           

          Class

           

           

           

           

           

        Mark as me if my question or my answer can be helpful for you :)
        • Re: "Server does not support secure connections. " ?

          07-13-2009, 5:54 PM

           hello

          i did smtp.enableSSL=false

          i have new errot message that The SMTP server requires a secure connection or the client was not authenticated. The server response was: SMTP authentication is required.

          What should i do ?

          Thanks

          Mark as me if my question or my answer can be helpful for you :)
          • Re: "Server does not support secure connections. " ?

            07-14-2009, 12:46 PM
            Answer

             hi

            if we have error that The SMTP server requires a secure connection or the client was not authenticated. The server response was: SMTP authentication is required., we should add below code too at paswordrecovery sendingmail.

              smtp.Port = 25

            smtp.Credentials = New NetworkCredential("*g", "*******")

             

             

            Mark as me if my question or my answer can be helpful for you :)
          • 0
            点赞
          • 0
            收藏
            觉得还不错? 一键收藏
          • 0
            评论
          评论
          添加红包

          请填写红包祝福语或标题

          红包个数最小为10个

          红包金额最低5元

          当前余额3.43前往充值 >
          需支付:10.00
          成就一亿技术人!
          领取后你会自动成为博主和红包主的粉丝 规则
          hope_wisdom
          发出的红包
          实付
          使用余额支付
          点击重新获取
          扫码支付
          钱包余额 0

          抵扣说明:

          1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
          2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

          余额充值