Hi. I'm behind a firewall. But incoming and outcoming email via gmail is allowed. I have the following configuration element:
<MailServer Name="smtp.gmail.com" Username="alfredocerrillo@gmail.com" Password="somepassword" FromAddress="alfredocerrillo@gmail.com" UseSecureConnection="false" />
The log show the following:
[23/12/2008 02:41:35 p.m.] Unable to send mail:
System.Net.Mail.SmtpException: Error al enviar correo. ---> System.Net.WebException: No es posible conectar con el servidor remoto ---> System.Net.Sockets.SocketException: Se produjo un error durante el intento de conexión ya que la parte conectada no respondió adecuadamente tras un periodo de tiempo, o bien se produjo un error en la conexión establecida ya que el host conectado no ha podido responder
en System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
en System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)
en System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
--- Fin del seguimiento de la pila de la excepción interna ---
en System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6, Int32 timeout)
en System.Net.PooledStream.Activate(Object owningObject, Boolean async, Int32 timeout, GeneralAsyncDelegate asyncCallback)
en System.Net.PooledStream.Activate(Object owningObject, GeneralAsyncDelegate asyncCallback)
en System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout)
en System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port)
en System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port)
en System.Net.Mail.SmtpClient.GetConnection()
en System.Net.Mail.SmtpClient.Send(MailMessage message)
--- Fin del seguimiento de la pila de la excepción interna ---
en System.Net.Mail.SmtpClient.Send(MailMessage message)
en SubversionNotify.Program.PostCommitProcessing(HTMLProcessor proc, subversionNotifyConfig cfg, String logFileName, String baseFolder)
what i'm doing wrong? It's valid to try use gmail as SMTP server?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi. I'm behind a firewall. But incoming and outcoming email via gmail is allowed. I have the following configuration element:
<MailServer Name="smtp.gmail.com" Username="alfredocerrillo@gmail.com" Password="somepassword" FromAddress="alfredocerrillo@gmail.com" UseSecureConnection="false" />
The log show the following:
[23/12/2008 02:41:35 p.m.] Unable to send mail:
System.Net.Mail.SmtpException: Error al enviar correo. ---> System.Net.WebException: No es posible conectar con el servidor remoto ---> System.Net.Sockets.SocketException: Se produjo un error durante el intento de conexión ya que la parte conectada no respondió adecuadamente tras un periodo de tiempo, o bien se produjo un error en la conexión establecida ya que el host conectado no ha podido responder
en System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
en System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)
en System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
--- Fin del seguimiento de la pila de la excepción interna ---
en System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6, Int32 timeout)
en System.Net.PooledStream.Activate(Object owningObject, Boolean async, Int32 timeout, GeneralAsyncDelegate asyncCallback)
en System.Net.PooledStream.Activate(Object owningObject, GeneralAsyncDelegate asyncCallback)
en System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout)
en System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port)
en System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port)
en System.Net.Mail.SmtpClient.GetConnection()
en System.Net.Mail.SmtpClient.Send(MailMessage message)
--- Fin del seguimiento de la pila de la excepción interna ---
en System.Net.Mail.SmtpClient.Send(MailMessage message)
en SubversionNotify.Program.PostCommitProcessing(HTMLProcessor proc, subversionNotifyConfig cfg, String logFileName, String baseFolder)
what i'm doing wrong? It's valid to try use gmail as SMTP server?
Alfredo,
Try setting the UseSecureConnection attribute to "true". This should solve your problem. Gmail requires a secure connection.
Cheers,
Mike
Not works. I will try to setup a SVN and SMTP server in my house, to determine if definitively the problem is the firewall.