TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Guest User
Tech Writer
2.1k
472.7k
How to resolve this issue when email is not verified?
Aug 3 2020 9:28 AM
Hi Team
I have this method and have enabled my authentication on my gmail, still get this exception;
public
Task SendAsync(IdentityMessage message)
{
// Plug in your email service here to send an email.
var mailMessage =
new
MailMessage();
mailMessage.To.Add(
new
MailAddress(message.Destination));
mailMessage.From =
new
MailAddress(
"
[email protected]
"
);
mailMessage.Subject = message.Subject;
mailMessage.IsBodyHtml =
true
;
mailMessage.Body = message.Body;
using
(var smtp =
new
SmtpClient())
{
var credential =
new
NetworkCredential
{
UserName =
"
[email protected]
"
,
Password =
"***"
};
try
{
smtp.Host =
"smtp.gmail.com"
;
smtp.Port = 587;
smtp.EnableSsl =
true
;
smtp.UseDefaultCredentials =
false
;
smtp.Credentials = credential;
smtp.Send(mailMessage);
}
catch
(Exception ex)
{
throw
;
}
}
return
Task.FromResult(0);
}
}
System.Net.Mail.SmtpException: 'The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Authentication Required. Learn more at'
Reply
Answers (
3
)
About Download code in mvc
can you help any one, i need tooltip in full calendar in angular