SMTP服务器要求安全连接或客户端未通过身份验证。如果上传的GoDaddy的 [英] The SMTP server requires a secure connection or the client was not authenticated. if uploading on godaddy

查看:1300
本文介绍了SMTP服务器要求安全连接或客户端未通过身份验证。如果上传的GoDaddy的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

低于code是工作在当地罚款,但如果上传上传它的godaddy它不工作。

错误:显示


  

SMTP服务器要求安全连接或客户端未
  验证。服务器响应为:5.5.1需要验证。
  了解更多


  53号线:
第54行:smtp.EnableSsl = TRUE;
线55:smtp.Send(消息);
第56行:
57号线:

PLZ检查低于code

 消息MAILMESSAGE新= MAILMESSAGE();
    message.From =新的MailAddress(emailid.Text);    message.To.Add(新MailAddress(receiver@gmail.com));    message.Subject =NaatKhawan的反馈;    message.Body =选择:+ DropDownList1.Text.ToString()+< BR />< BR />名称:+ name.Text.ToString()+< BR />&LT ; BR />电子邮件:+ emailid.Text.ToString()+< BR />< BR />联系电话:+ phone.Text.ToString()+< BR /> < BR />消息:LT; BR />中+ remabox.Text.ToString();    message.IsBodyHtml = TRUE;    // finaly发送电子邮件:
    SmtpClient SMTP =新SmtpClient();
    smtp.Host =smtp.gmail.com;    smtp.Port = 587;
    smtp.Credentials =新System.Net.NetworkCredential(123@gmail.com,123);    smtp.EnableSsl = TRUE;
    smtp.Send(消息);
    lbltxt.Visible = TRUE;
    name.Text =;
    emailid.Text =;
    phone.Text =;
    remabox.Text =;    lbltxt.Text =感谢您的支持NaatKhawan


解决方案

您应该使应用程序能够访问Gmail帐户。 此链接将帮助您

below code is working fine in local, but if upload upload it on godaddy it is not working.

Error: showing

The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required. Learn more at

Line 53:        
Line 54:         smtp.EnableSsl = true;
Line 55:         smtp.Send(message);
Line 56: 
Line 57: 

plz check below code

    MailMessage message = new MailMessage();
    message.From = new MailAddress(emailid.Text);

    message.To.Add(new MailAddress("receiver@gmail.com"));

    message.Subject = "NaatKhawan's Feedback";

    message.Body = "Selected: " + DropDownList1.Text.ToString() + "<br/><br/>Name: " + name.Text.ToString() + " <br/><br/>Email: " + emailid.Text.ToString() + " <br/><br/>Contact Number: " + phone.Text.ToString() + " <br/><br/>Message:<br/> " + remabox.Text.ToString();

    message.IsBodyHtml = true;

    // finaly send the email:
    SmtpClient smtp = new SmtpClient();
    smtp.Host = "smtp.gmail.com";

    smtp.Port = 587;
    smtp.Credentials = new System.Net.NetworkCredential("123@gmail.com", "123");

    smtp.EnableSsl = true;
    smtp.Send(message);
    lbltxt.Visible = true;
    name.Text = "";
    emailid.Text = "";
    phone.Text = "";
    remabox.Text = "";

    lbltxt.Text = "Thank you for supporting NaatKhawan";

解决方案

you should enable application to access gmail account. This link will help you

这篇关于SMTP服务器要求安全连接或客户端未通过身份验证。如果上传的GoDaddy的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆