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
Savita Joshi
NA
129
132.9k
Error:The SMTP host was not specified.
Jun 17 2011 2:27 AM
Hi,
Plzz check this code and tell me where i am going wrong.. Code given below:
public void sendemail( string email)
{
string EMAILID = email;
string EMAILBODY;
MailMessage objemail = new MailMessage();
objemail.To.Add(new MailAddress(email));
objemail.From = new MailAddress("
[email protected]
");
objemail.Subject = "Password recovery";
EMAILBODY = "<html>";
EMAILBODY += "<Body>";
EMAILBODY += "<table width=30%; cellpadding=5; border=0; align=centre;bgcolor=#f1fff9>";
EMAILBODY += "<tr><td colspan=2 align=center bgcolor=#dff6d2><b>User Credentials:</b></td></tr>";
EMAILBODY += "<tr><td>User:</td>";
EMAILBODY += "<td align=left>"+userid+"</td></tr>";
EMAILBODY += "<tr><td>Click the link to reset your password:</td>";
EMAILBODY += "<td><a href='www.domainname.com'>Reset password</a></td></tr>";
EMAILBODY += "<Body>";
EMAILBODY += "</table>";
EMAILBODY = "<html>";
objemail.Body = EMAILBODY;
objemail.Priority = MailPriority.High;
objemail.IsBodyHtml = true;
SmtpClient smtpmail = new SmtpClient();
smtpmail.Send(objemail);
}
Reply
Answers (
3
)
how to load mobile web application with the help of Icon on windows HTC Mobile
Use Stored Procedure in ASP.NET with GridView.