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
Rehan meo
NA
8
3.5k
smtp.send(mailMsg)(Define this erroe how can i sove)
Apr 14 2014 6:58 AM
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net.Mail;
using System.Net.Security;
namespace SendEmail
{
public partial class SendEmail : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnSentFeedBack_Click(object sender, EventArgs e)
{
MailMessage mailMsg =new MailMessage();
mailMsg.From = new MailAddress(txtEmail.Text);
mailMsg.IsBodyHtml = true;
mailMsg.Subject = "Contect Details";
mailMsg.Body = "Contact Detail" + "<b>Name<b>" + txtName.Text + "<br /><b>Email-Email :</b>" +
txtEmail.Text + "<br /><b>Comments :<b/>" + txtComment.Text;
SmtpClient smtp = new SmtpClient("
[email protected]
", 587);
mailMsg.Priority = MailPriority.Normal;
smtp.Credentials = new System.Net.NetworkCredential("
[email protected]
","abcd");
smtp.Timeout = 25000;
smtp.EnableSsl = true;
smtp.Send(mailMsg);
Label4.Text = "Thanks you.Your contect details and feed Back has been submited.";
}
}
}
Reply
Answers (
2
)
Daemon Thread?
how to exceute a command using c#.net