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
d kris
NA
4
0
Sending mails through C#.net
Apr 25 2010 8:18 AM
Hi everyone,
There is a code snippet for sending mail via c#.net application....It requires the header file System.Web.Mail...
All I wanted to know is that - is installation of iis a pre requisite for using this particular feature? please lemme know ... Any help would be appreciated... The code is sumthing like this:
System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage();
System.Net.NetworkCredential cred = new System.Net.NetworkCredential("
[email protected]
", "password");
mail.To.Add("
[email protected]
");
mail.Subject = "Reminder";
mail.From = new System.Net.Mail.MailAddress("
[email protected]
", "def");
mail.IsBodyHtml = true;
mail.Body = "This is a system generated mesage";
System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("smtp.gmail.com");
smtp.UseDefaultCredentials = false;
smtp.EnableSsl = true;
smtp.Credentials = cred;
smtp.Send(mail);
thanx again
Reply
Answers (
3
)
Urgent Help in making DATAGRID text buttons !!!
Problem connecting to Access database with user level security