8/7/2013 8:52:46 AM
515
Reputation
67
Total posts
Hi,
I receive an error when a user tries to register on the site. Please see the error below..
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Server Error in '/' Application.Server does not support secure connections.Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.Mail.SmtpException: Server does not support secure connections.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SmtpException: Server does not support secure connections.]
System.Net.Mail.SmtpConnection.GetConnection(ServicePoint servicePoint) +1443335
System.Net.Mail.SmtpTransport.GetConnection(ServicePoint servicePoint) +170
System.Net.Mail.SmtpClient.GetConnection() +44
System.Net.Mail.SmtpClient.Send(MailMessage message) +1852
MonoSoftware.Core.Mail.MailSender.SendMail(MailMessage mailMsg) +149
[ApplicationException: An error has occured while sending you an e-mail. Please try again, if the problem persists, please contact us.]
MonoSoftware.MonoX.Mail.MonoXMailSender.SendMail(MailMessage mailMsg) +75
MonoSoftware.Core.Mail.MailSender.SendMail(MailAddress fromAddress, String toAddress, String title, String htmlContent, String plainContent) +454
MonoSoftware.Core.Mail.MailSender.SendMail(String toAddress, String title, String htmlContent, String plainContent) +65
MonoSoftware.MonoX.ModuleGallery.MembershipEditor.#Jp(Object sender, EventArgs e) +1058
[ApplicationException: An uexpected error has occured while sending you an activation e-mail. Your account has been successfully created but you can't login until you activate it via activation e-mail. To resend your activation e-mail please go to the <a href="/Membership/ActivationEmailRecovery.aspx">Activation e-mail recovery</a> page. If the problem persists, please contact us.]
MonoSoftware.MonoX.ModuleGallery.MembershipEditor.#Jp(Object sender, EventArgs e) +1232
MonoSoftware.MonoX.Controls.StyledButton.OnClick(Object sender, EventArgs e) +28
MonoSoftware.MonoX.Controls.StyledButton.#Ho(Object sender, EventArgs e) +23
System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) +91
System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +91
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +169
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3260
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
I created a custom contact us page and used the following code to send the emails. And the emails are delivered fine.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
protected void SendMail()
{
// any address where the email will be sending
var toAddress = YourEmail.Text.ToString();
//Password of your gmail address
const string fromPassword = "Password";
// Passing the values and make a email formate to display
string body = "From: " + YourName.Text + "\n";
body += "Email: " + YourEmail.Text + "\n";
body += "Subject: " + YourSubject.Text + "\n";
body += "Question: \n" + Comments.Text + "\n";
string fromEmail = "support@.....com";
MailMessage mail = new MailMessage(fromEmail, "admin@.....com");
mail.Subject = YourSubject.Text.ToString();
mail.Body = body;
mail.IsBodyHtml = true;
mail.BodyEncoding = System.Text.Encoding.UTF8;
try
{
DisplayMessage.Visible = true;
SmtpClient smtpClient = new SmtpClient();
NetworkCredential oCredential = new NetworkCredential("admin@.....com", "fsdfsdfsd");
smtpClient.UseDefaultCredentials = false;
smtpClient.Credentials = oCredential;
smtpClient.Send(mail);
DisplayMessage.Text = "Thank you. We have recieved your query and will get back to you shortly.";
}
catch (Exception ex)
{
DisplayMessage.Text = ex.Message;
}
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
If this was an issue with server then I believe none of the emails would have been sent out..
Rating history (Content is rated 0.00 of 0 vote(s).)
Shows who have rated the content, and the rating score.