I am unable to set up properly smtp. After clicking button save&test task is created and it fails with 'The operation has timed out.'
I am sure that provided data is correct. On the same server (Windows 2012) TeamCity is able to connect to my smtp server.
Thanks for reaching out. Another customer has previously reported a similar issue, which was resolved using a different port number. See towards the bottom of this discussion http://help.octopusdeploy.com/discussions/problems/12078-email-verification-failing
If you find that didn’t help, below is a code snippet that illustrates how we test the connection. If you could try to run this and see if it gives any more specific details or better error messages.
void SendTestEmail(string host, int port, string username, string password, string from, string to)
using (var smtpClient = new SmtpClient(host, port))
smtpClient.EnableSsl = true;
smtpClient.Credentials = new NetworkCredential(username, password);
var message = new MailMessage(from, to, "Test message", "Test the SMTP connection");
Let me know if that helps or if I can assist further.
Thank You for hint. Now I know what is causing problem. I was trying to connect to my smtp server (hosted by OVH) which is secured by ssl. The reason is that System.Net.Mail doesn’t support ImplicitSSL connection
(https://blogs.msdn.microsoft.com/webdav_101/2008/06/02/system-net-mail-with-ssl-to-authenticate-against-port-465/). I am able to connect without securing connection but it’s not an option for me. Is there any way to use ImplicitSSL in current release? If not maybe You should add such an option ( not tested yet but maybe this will be helpfull https://www.nuget.org/packages/AIM)
So just to confirm, it worked with Explicit SSL on port 587 but you have a specific requirement for Implicit SSL?
We have no current plans to move away from System.Net.Mail, but we’re always willing to listen to the community’s input. I have created an item in user voice, which you can vote for here (https://octopusdeploy.uservoice.com/forums/170787-general/suggestions/14772192-smtp-implicit-ssl)
Hi, It’s exactly as You said. But for now I can workaround this problem with stunnel application.
Thank You for Your help.