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
Bhautik Moradiya
NA
81
10.8k
For Solve My Small Error
Dec 25 2017 5:49 AM
Hello I am Bhautik,
I am getting Error at smtp.Send(mm) so Please give me solution.
using (MailMessage mm = new MailMessage(txtemail.Text,"
[email protected]
"))
{
mm.Subject = "Your Details";
mm.Body = " Thanks for Visiting;
mm.IsBodyHtml = false;
SmtpClient smtp = new SmtpClient();
smtp.Host = "smtp.gmail.com";
smtp.EnableSsl = true;
NetworkCredential NetworkCred = new NetworkCredential("
[email protected]
", "abc");
smtp.UseDefaultCredentials = true;
smtp.Credentials = NetworkCred;
smtp.Port = 587;
smtp.Send(mm);
ClientScript.RegisterStartupScript(GetType(), "alert", "alert('Email sent.');", true);
}
Reply
Answers (
2
)
User Validation in annotations
Enable background process asp.net c# Please help me