Click here to Skip to main content
15,906,081 members
Home / Discussions / C#
   

C#

 
AnswerRe: KeyChar reference, does it vary with keyboard? Pin
Andrei Ungureanu8-Oct-07 3:27
Andrei Ungureanu8-Oct-07 3:27 
GeneralRe: KeyChar reference, does it vary with keyboard? Pin
c#_keithy8-Oct-07 3:35
c#_keithy8-Oct-07 3:35 
QuestionHow to determine provider type Pin
jpasher8-Oct-07 2:41
jpasher8-Oct-07 2:41 
QuestionCommunicating with a service Pin
Lars Lie8-Oct-07 2:30
Lars Lie8-Oct-07 2:30 
AnswerRe: Communicating with a service Pin
Judah Gabriel Himango8-Oct-07 4:34
sponsorJudah Gabriel Himango8-Oct-07 4:34 
Questionusing events as arguments Pin
Bekjong8-Oct-07 2:30
Bekjong8-Oct-07 2:30 
AnswerRe: using events as arguments Pin
Pete O'Hanlon8-Oct-07 2:41
mvePete O'Hanlon8-Oct-07 2:41 
GeneralRe: using events as arguments Pin
Bekjong8-Oct-07 3:11
Bekjong8-Oct-07 3:11 
GeneralRe: using events as arguments Pin
Scott Dorman8-Oct-07 3:57
professionalScott Dorman8-Oct-07 3:57 
GeneralRe: using events as arguments Pin
Pete O'Hanlon8-Oct-07 4:00
mvePete O'Hanlon8-Oct-07 4:00 
QuestionWSS 3.0 Config Database Pin
lsconyer8-Oct-07 2:22
lsconyer8-Oct-07 2:22 
Questionhow to read rext file? Pin
P_Elza8-Oct-07 0:52
P_Elza8-Oct-07 0:52 
AnswerRe: how to read rext file? Pin
Andrei Ungureanu8-Oct-07 0:59
Andrei Ungureanu8-Oct-07 0:59 
AnswerRe: how to read rext file? Pin
rajansethi8-Oct-07 2:47
rajansethi8-Oct-07 2:47 
QuestionHow to convert a PDF document to JPG. Pin
Exelioindia8-Oct-07 0:48
Exelioindia8-Oct-07 0:48 
AnswerRe: How to convert a PDF document to JPG. Pin
Christian Graus8-Oct-07 1:12
protectorChristian Graus8-Oct-07 1:12 
GeneralRe: How to convert a PDF document to JPG. Pin
Exelioindia8-Oct-07 2:28
Exelioindia8-Oct-07 2:28 
GeneralRe: How to convert a PDF document to JPG. Pin
Pete O'Hanlon8-Oct-07 2:43
mvePete O'Hanlon8-Oct-07 2:43 
QuestionWindowsPrincipal object gives null value for username when checked in component Pin
Naveen S H8-Oct-07 0:41
Naveen S H8-Oct-07 0:41 
QuestionWhere will be the assembly stores in the System Pin
pashitech8-Oct-07 0:40
pashitech8-Oct-07 0:40 
AnswerRe: Where will be the assembly stores in the System Pin
Pete O'Hanlon8-Oct-07 1:45
mvePete O'Hanlon8-Oct-07 1:45 
QuestionError while using System.Net.Mail.SmtpClient to send mail Pin
A M SOMAN7-Oct-07 22:59
A M SOMAN7-Oct-07 22:59 
I am trying to send a mail through my console application which is in .Net 2.0 with C# language. I am using the class System.Net.Mail.SmtpClient to send a mail. This was decided because the older version of this class System.Web.Mail.SmtpMail is now totally obsolete.
But I get an error message as "Failure sending mail." when I run my code.
I tried to resolve this by following:
1. Tried pinging the address from command prompt. It shows reply.
2. Assigned port number as number 25. Doesn't work. Gives same error.
Following is my code

FromEmail = "anil.soman@xyz.com";
strEmailAddre = "somebody@xyz.com";
strSubject = "some subject";
strBody = "some text for body";
System.Net.Mail.SmtpClient SMTPClient = new System.Net.Mail.SmtpClient();
SMTPClient.Host = "smtpservername";
SMTPClient.Port = 25;
SMTPClient.Send(FromEmail, strEmailAddre, strSubject, strBody);

What could be the reason for this? Any suggessions? Thanks in advance.



Regards,
Anil
AnswerRe: Error while using System.Net.Mail.SmtpClient to send mail Pin
Andrei Ungureanu7-Oct-07 23:23
Andrei Ungureanu7-Oct-07 23:23 
GeneralRe: Error while using System.Net.Mail.SmtpClient to send mail Pin
A M SOMAN8-Oct-07 0:49
A M SOMAN8-Oct-07 0:49 
GeneralRe: Error while using System.Net.Mail.SmtpClient to send mail Pin
Andrei Ungureanu8-Oct-07 1:02
Andrei Ungureanu8-Oct-07 1:02 

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.