Related Tags:
C# C# (pronounced "C-sharp") is an object-oriented programming language from Microsoft that aims to combine the computing power of C++ with the programming ease of Visual Basic. C# is based on C++ and contains features similar to those of Java. Learn More, ASP.NET MVC The ASP.NET MVC framework is a lightweight, highly testable presentation framework that (as with Web Forms-based applications) is integrated with existing ASP.NET features, such as master pages and membership-based authentication. The MVC framework is defined in the System.Web.Mvc assembly. Learn More, SMTP Simple Mail Transfer Protocol (SMTP) is the standard protocol for email services on a TCP/IP network. SMTP provides the ability to send and receive email messages. SMTP is an application-layer protocol that enables the transmission and delivery of email over the Internet. Learn More,

Getting the error "Server does not support secure connections" while sending emails by using c#

Description:I have used a method for sending email that was working fine what I have used gmail email address but now testing purpose I have changed the email address not gmail this time and now getting the error "Server does not support secure connections" while sending emails.

Posted by: | Posted on: Sep 28, 2018

1 answers

Replies

5

You did't show your code here for email sending method but still i believe this is a configuration issue you can fix this by updating your web.config file.
In the following chunk you just need to set enableSsl="false" which will fix the issue.

<system.net>
<mailSettings>
<smtp>
<network host="smtp.gmail.com" port="25" userName="YourEmailAddress@gmail.com" enableSsl="false" password="xxxxxxx"/>
</smtp>
</mailSettings>
</system.net>

Note: As you have set enableSsl="false" in web.config make sure you shouldn't set in your code.

Replied by: | Replied on: Sep 28, 2018



Reply
×

Code block Hyperlink bold Quotes block Upload Images

Preview