Click here to Skip to main content
15,896,557 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# PSAPI_VERSION. and sevral other question [modified] [Partialy Solved] Pin
Saksida Bojan5-Sep-11 5:45
Saksida Bojan5-Sep-11 5:45 
GeneralRe: C# PSAPI_VERSION. and sevral other question [modified] [Partialy Solved] Pin
BobJanova5-Sep-11 5:51
BobJanova5-Sep-11 5:51 
Question8 directional chain code for monochrome images Pin
dookeybre3-Sep-11 16:03
dookeybre3-Sep-11 16:03 
AnswerRe: 8 directional chain code for monochrome images Pin
OriginalGriff3-Sep-11 21:19
mveOriginalGriff3-Sep-11 21:19 
GeneralRe: 8 directional chain code for monochrome images Pin
dookeybre3-Sep-11 21:21
dookeybre3-Sep-11 21:21 
QuestionDiscovering and Accessing IP Cameras Pin
AmbiguousName3-Sep-11 0:58
AmbiguousName3-Sep-11 0:58 
AnswerRe: Discovering and Accessing IP Cameras Pin
Abhinav S3-Sep-11 6:00
Abhinav S3-Sep-11 6:00 
QuestionEmail Sender :the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond Pin
bigz_10002-Sep-11 21:46
bigz_10002-Sep-11 21:46 
Hi there,

I have another problem in my code,

this is my code :

C#
private void SendEmail(MailMessage message, MailAddress from)
       {

           SmtpClient smtpClient = new SmtpClient("smtp.gmail.com", 587);
           smtpClient.EnableSsl = false;
           smtpClient.UseDefaultCredentials = false;

           smtpClient.Credentials = new NetworkCredential("someone@gmail.com", "password");

           try
           {
               smtpClient.Send(message);

           }
           catch (Exception ex)
           {
               throw new Exception(ex.Message);
           }
           finally
           {
               message.Dispose();
           }
       }


and now I have following exception in line "smtpClient.Send(message)" :


System.Net.Mail.SmtpException: Failure sending mail. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 209.85.143.108:587
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6, Int32 timeout)
at System.Net.PooledStream.Activate(Object owningObject, Boolean async, Int32 timeout, GeneralAsyncDelegate asyncCallback)
at System.Net.PooledStream.Activate(Object owningObject, GeneralAsyncDelegate asyncCallback)
at System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout)
at System.Net.Mail.SmtpConnection.GetConnection(ServicePoint servicePoint)
at System.Net.Mail.SmtpTransport.GetConnection(ServicePoint servicePoint)
at System.Net.Mail.SmtpClient.GetConnection()
at System.Net.Mail.SmtpClient.Send(MailMessage message)
--- End of inner exception stack trace ---
at System.Net.Mail.SmtpClient.Send(MailMessage message)
at EmailSender.EmailSenderForm.SendEmail(MailMessage message, MailAddress from) in


is it from my code or my machine or my network or ...?
AnswerRe: Email Sender :the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond Pin
Mehdi Gholam2-Sep-11 21:50
Mehdi Gholam2-Sep-11 21:50 
GeneralRe: Email Sender :the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond Pin
bigz_10002-Sep-11 22:04
bigz_10002-Sep-11 22:04 
GeneralRe: Email Sender :the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond Pin
Dave Kreskowiak3-Sep-11 8:40
mveDave Kreskowiak3-Sep-11 8:40 
GeneralRe: Email Sender :the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond Pin
bigz_10004-Sep-11 0:10
bigz_10004-Sep-11 0:10 
AnswerRe: Email Sender :the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond Pin
jschell3-Sep-11 10:39
jschell3-Sep-11 10:39 
GeneralRe: Email Sender :the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond Pin
bigz_10004-Sep-11 0:11
bigz_10004-Sep-11 0:11 
GeneralRe: Email Sender :the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond Pin
Michael J. Eber8-Sep-11 7:47
Michael J. Eber8-Sep-11 7:47 
QuestionC#4.0 How Connect Crystal Report [modified] Pin
Ken H1232-Sep-11 21:10
Ken H1232-Sep-11 21:10 
AnswerRe: C#4.0 How Connect Crystal Report Pin
Abhinav S2-Sep-11 21:28
Abhinav S2-Sep-11 21:28 
AnswerRe: C#4.0 How Connect Crystal Report Pin
Vijjuuu.3-Sep-11 1:53
Vijjuuu.3-Sep-11 1:53 
GeneralRe: C#4.0 How Connect Crystal Report Pin
Ken H1234-Sep-11 20:47
Ken H1234-Sep-11 20:47 
AnswerRe: C#4.0 How Connect Crystal Report Pin
palanidothis4-Sep-11 6:50
palanidothis4-Sep-11 6:50 
GeneralRe: C#4.0 How Connect Crystal Report Pin
Ken H1234-Sep-11 20:45
Ken H1234-Sep-11 20:45 
GeneralRe: C#4.0 How Connect Crystal Report Pin
Ken H1234-Sep-11 20:48
Ken H1234-Sep-11 20:48 
QuestionLock DLL in C# Pin
jojoba20112-Sep-11 20:53
jojoba20112-Sep-11 20:53 
AnswerRe: Lock DLL in C# Pin
Abhinav S2-Sep-11 21:25
Abhinav S2-Sep-11 21:25 
AnswerRe: Lock DLL in C# Pin
harold aptroot3-Sep-11 1:32
harold aptroot3-Sep-11 1:32 

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.