Click here to Skip to main content
15,889,595 members
Home / Discussions / C#
   

C#

 
GeneralRe: Difference between Instance and Object Pin
Guffa26-Aug-08 3:16
Guffa26-Aug-08 3:16 
GeneralRe: Difference between Instance and Object Pin
.NET- India 26-Aug-08 3:19
.NET- India 26-Aug-08 3:19 
AnswerRe: Difference between Instance and Object Pin
Guffa26-Aug-08 8:32
Guffa26-Aug-08 8:32 
Questionbuilding C# Pin
kk.tvm25-Aug-08 23:08
kk.tvm25-Aug-08 23:08 
AnswerRe: building C# Pin
Manas Bhardwaj25-Aug-08 23:16
professionalManas Bhardwaj25-Aug-08 23:16 
AnswerRe: building C# Pin
lisan_al_ghaib26-Aug-08 1:31
lisan_al_ghaib26-Aug-08 1:31 
AnswerRe: building C# Pin
PIEBALDconsult26-Aug-08 3:32
mvePIEBALDconsult26-Aug-08 3:32 
QuestionSMTP Exception Pin
Christiaan Laubscher25-Aug-08 22:58
Christiaan Laubscher25-Aug-08 22:58 
Hi
I am trying to send an e - mail message. I have supplied the wrong network - credentials so that an exception would hopefully be thrown.
However, no exception is thrown. I find this very strange.
Heres my code:



mailMsg.Subject = m_Subject; // Subject of the E - mail.
mailMsg.Body = m_Content; // Content of the E - mail.
mailMsg.IsBodyHtml = true;
mailMsg.BodyEncoding = System.Text.Encoding.UTF8;
mailMsg.To.Add(m_Address); // The address to which the e - mail message must be sent.
mailMsg.DeliveryNotificationOptions = DeliveryNotificationOptions.Never;
System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient(serp_URL);
System.Net.NetworkCredential netCred = new System.Net.NetworkCredential();
netCred.UserName = serp_LoginName;
netCred.Password = serp_Password;
smtp.Credentials = netCred;
smtp.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
try
{
smtp.Send(mailMsg);
}
catch (System.Net.Mail.SmtpFailedRecipientException)
{ // Or any other exception for that matter.
return false;
}



Any help would be greatly appreciated.

ChristiaanS

AnswerRe: SMTP Exception Pin
I_AM_ERROR27-Aug-10 9:25
I_AM_ERROR27-Aug-10 9:25 
QuestionHow to change the value from database into some other language Pin
tauras8125-Aug-08 22:44
tauras8125-Aug-08 22:44 
AnswerRe: How to change the value from database into some other language Pin
Shpendh25-Aug-08 23:03
Shpendh25-Aug-08 23:03 
Question.dll issue! VBA to C#?! Pin
andredani25-Aug-08 22:25
andredani25-Aug-08 22:25 
AnswerRe: .dll issue! VBA to C#?! Pin
selcuks25-Aug-08 22:37
selcuks25-Aug-08 22:37 
AnswerRe: .dll issue! VBA to C#?! Pin
Guffa26-Aug-08 2:03
Guffa26-Aug-08 2:03 
AnswerRe: .dll issue! VBA to C#?! Pin
Alan N26-Aug-08 7:43
Alan N26-Aug-08 7:43 
QuestionWIndows Service in Windows Form Pin
idreesbadshah25-Aug-08 22:14
idreesbadshah25-Aug-08 22:14 
AnswerRe: WIndows Service in Windows Form Pin
PIEBALDconsult26-Aug-08 3:34
mvePIEBALDconsult26-Aug-08 3:34 
GeneralRe: WIndows Service in Windows Form Pin
idreesbadshah26-Aug-08 18:12
idreesbadshah26-Aug-08 18:12 
GeneralRe: WIndows Service in Windows Form Pin
PIEBALDconsult27-Aug-08 4:52
mvePIEBALDconsult27-Aug-08 4:52 
QuestionRegular expression Pin
hadad25-Aug-08 21:30
hadad25-Aug-08 21:30 
AnswerRe: Regular expression Pin
J4amieC25-Aug-08 21:59
J4amieC25-Aug-08 21:59 
GeneralRe: Regular expression Pin
hadad25-Aug-08 23:03
hadad25-Aug-08 23:03 
GeneralRe: Regular expression Pin
J4amieC25-Aug-08 23:20
J4amieC25-Aug-08 23:20 
GeneralRe: Regular expression Pin
J4amieC25-Aug-08 23:24
J4amieC25-Aug-08 23:24 
GeneralRe: Regular expression Pin
hadad26-Aug-08 0:15
hadad26-Aug-08 0:15 

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.