Click here to Skip to main content
15,922,894 members
Home / Discussions / C#
   

C#

 
AnswerRe: Executing,accessing and change a "CorelDraw" file through C# application Pin
Eddy Vluggen5-Sep-11 6:43
professionalEddy Vluggen5-Sep-11 6:43 
AnswerRe: Executing,accessing and change a "CorelDraw" file through C# application Pin
Mahtab7775-Sep-11 21:12
Mahtab7775-Sep-11 21:12 
GeneralRe: Executing,accessing and change a "CorelDraw" file through C# application Pin
Pete O'Hanlon5-Sep-11 21:42
mvePete O'Hanlon5-Sep-11 21:42 
QuestionPolymorphism Pin
MUHAMMAD FAROOQ19914-Sep-11 0:59
MUHAMMAD FAROOQ19914-Sep-11 0:59 
AnswerRe: Polymorphism Pin
DaveyM694-Sep-11 1:57
professionalDaveyM694-Sep-11 1:57 
AnswerRe: Polymorphism Pin
PIEBALDconsult4-Sep-11 5:18
mvePIEBALDconsult4-Sep-11 5:18 
AnswerRe: Polymorphism Pin
Abhinav S4-Sep-11 6:26
Abhinav S4-Sep-11 6:26 
AnswerRe: Polymorphism Pin
Alan Balkany6-Sep-11 4:47
Alan Balkany6-Sep-11 4:47 
GeneralRe: Polymorphism Pin
PIEBALDconsult6-Sep-11 14:44
mvePIEBALDconsult6-Sep-11 14:44 
GeneralRe: Polymorphism Pin
Alan Balkany7-Sep-11 4:43
Alan Balkany7-Sep-11 4:43 
GeneralRe: Polymorphism Pin
PIEBALDconsult7-Sep-11 14:21
mvePIEBALDconsult7-Sep-11 14:21 
GeneralRe: Polymorphism Pin
Alan Balkany8-Sep-11 4:54
Alan Balkany8-Sep-11 4:54 
GeneralRe: Polymorphism Pin
PIEBALDconsult8-Sep-11 14:19
mvePIEBALDconsult8-Sep-11 14:19 
GeneralRe: Polymorphism Pin
Michael J. Eber8-Sep-11 7:41
Michael J. Eber8-Sep-11 7:41 
GeneralRe: Polymorphism Pin
PIEBALDconsult8-Sep-11 14:22
mvePIEBALDconsult8-Sep-11 14:22 
QuestionC# PSAPI_VERSION. and sevral other question [modified] [Partialy Solved] Pin
Saksida Bojan3-Sep-11 23:12
Saksida Bojan3-Sep-11 23:12 
AnswerRe: C# PSAPI_VERSION. and sevral other question [modified] [Partialy Solved] Pin
BobJanova4-Sep-11 23:11
BobJanova4-Sep-11 23:11 
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 ...?

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.