Click here to Skip to main content
15,887,485 members
Home / Discussions / C#
   

C#

 
GeneralRe: how to add lists Pin
saurabh001 m6-Dec-11 22:21
saurabh001 m6-Dec-11 22:21 
AnswerRe: how to add lists Pin
Richard MacCutchan6-Dec-11 22:22
mveRichard MacCutchan6-Dec-11 22:22 
GeneralRe: how to add lists Pin
saurabh001 m6-Dec-11 22:23
saurabh001 m6-Dec-11 22:23 
GeneralRe: how to add lists Pin
Richard MacCutchan6-Dec-11 23:15
mveRichard MacCutchan6-Dec-11 23:15 
AnswerRe: how to add lists Pin
OriginalGriff6-Dec-11 22:36
mveOriginalGriff6-Dec-11 22:36 
GeneralRe: how to add lists Pin
saurabh001 m6-Dec-11 22:58
saurabh001 m6-Dec-11 22:58 
AnswerRe: how to add lists Pin
BillWoodruff7-Dec-11 10:11
professionalBillWoodruff7-Dec-11 10:11 
QuestionEmail Exception Catching Pin
AmbiguousName6-Dec-11 20:48
AmbiguousName6-Dec-11 20:48 
hello guys... I have got this email program from internet, which works absolutely fine. But I wanna catch exceptions when something goes wrong, and I dont know what to catch. Here is the program
C#
SmtpClient client = new SmtpClient("smtp.gmail.com");
client.Port = 587;
client.EnableSsl = true;
client.Credentials = new System.Net.NetworkCredential("username@gmail.com", "password");

MailMessage msg;
MailAddress from;
MailAddress to;

from = new MailAddress("From Email Address", "my name here", System.Text.Encoding.UTF8);
to = new MailAddress("To Email Address");

msg = new MailMessage(from, to);
msg.Body = txtBody.Text;
msg.Body += Environment.NewLine;
msg.BodyEncoding = System.Text.Encoding.UTF8;
msg.Subject = txtSubject.Text;
msg.SubjectEncoding = System.Text.Encoding.UTF8;
client.Send(msg);
msg.Dispose();

thnx for any suggestions.
AnswerRe: Email Exception Catching Pin
Wayne Gaylard6-Dec-11 21:18
professionalWayne Gaylard6-Dec-11 21:18 
AnswerRe: Email Exception Catching Pin
AmbiguousName6-Dec-11 21:47
AmbiguousName6-Dec-11 21:47 
GeneralRe: Email Exception Catching Pin
Richard MacCutchan6-Dec-11 22:19
mveRichard MacCutchan6-Dec-11 22:19 
GeneralRe: Email Exception Catching Pin
Wayne Gaylard6-Dec-11 22:20
professionalWayne Gaylard6-Dec-11 22:20 
AnswerRe: Email Exception Catching Pin
Dan Mos6-Dec-11 22:25
Dan Mos6-Dec-11 22:25 
QuestionSerialization Problem Pin
Kevin Marois6-Dec-11 13:45
professionalKevin Marois6-Dec-11 13:45 
AnswerRe: Serialization Problem Pin
BillWoodruff6-Dec-11 16:30
professionalBillWoodruff6-Dec-11 16:30 
AnswerRe: Serialization Problem Pin
Mycroft Holmes6-Dec-11 19:20
professionalMycroft Holmes6-Dec-11 19:20 
AnswerRe: Serialization Problem Pin
Dan Mos6-Dec-11 20:50
Dan Mos6-Dec-11 20:50 
AnswerRe: Serialization Problem Pin
Pete O'Hanlon6-Dec-11 20:59
mvePete O'Hanlon6-Dec-11 20:59 
GeneralRe: Serialization Problem Pin
Kevin Marois7-Dec-11 5:22
professionalKevin Marois7-Dec-11 5:22 
GeneralRe: Serialization Problem Pin
Pete O'Hanlon7-Dec-11 5:25
mvePete O'Hanlon7-Dec-11 5:25 
GeneralRe: Serialization Problem Pin
BillWoodruff7-Dec-11 10:34
professionalBillWoodruff7-Dec-11 10:34 
QuestionHow to fetch the user filled fields in PDF form Pin
Ravi k rao6-Dec-11 9:58
Ravi k rao6-Dec-11 9:58 
AnswerRe: How to fetch the user filled fields in PDF form Pin
Not Active6-Dec-11 11:54
mentorNot Active6-Dec-11 11:54 
AnswerRe: How to fetch the user filled fields in PDF form Pin
Wonde Tadesse6-Dec-11 13:09
professionalWonde Tadesse6-Dec-11 13:09 
GeneralRe: How to fetch the user filled fields in PDF form Pin
Ravi k rao6-Dec-11 21:25
Ravi k rao6-Dec-11 21:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.