Failed to send Email without any detailed error message

Hi,

Occasionally an email notification fails (see attached screenshots).

Is there a way to add more diagnostics to the Task Log?

Is there a way to get more diagnostic information at all e.g. from a log file on a server?

Thanks,
Mau.

Hi,

Thanks for getting in touch! If you click on the Verbose or Raw links on the task log page you should get the full details of the SMTP Exception that was thrown, and that will usually have enough information to tell you what has gone wrong. It will look something like this:

Failure sending mail.
System.Net.Mail.SmtpException: Failure sending mail. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:123
   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, Exception& exception)

If that doesn’t provide enough information, or you need help interpreting the error please get back in touch.

Hope that helps!

Mark

Mark,

I’ve checked Verbose or Raw Link but I don’t see any more details:
| == Warning: Step 26: Send email summary ==
15:48:03 Verbose | Octopus Server version: 3.3.10+Branch.master.Sha.365b9921133c9490a3ac820844cbb8edb603873f
15:48:03 Verbose | Email parameters:
15:48:03 Verbose | Subject:
15:48:03 Verbose | To:
15:48:03 Verbose | Cc:
15:48:03 Verbose | Bcc:
15:48:03 Verbose | Sending email message…
15:48:05 Error | Failure sending mail.
15:49:26 Info | Guidance received: Retry
15:49:26 Info | Retry attempt #1
15:49:26 Verbose | Email parameters:
15:49:26 Verbose | Subject:
15:49:26 Verbose | To:
15:49:26 Verbose | Cc:
15:49:26 Verbose | Bcc:
15:49:26 Verbose | Sending email message…
15:49:28 Error | Failure sending mail.
15:53:58 Info | Guidance received: Ignore
15:53:58 Verbose | Send email summary completed

Where I’ve manually replaced email addressed / subject with

Thanks,
Mau.

116091409092102231.jpg

116091409092102431.jpg

116091409092102631.jpg

116051209153905227.jpg

116091409092101931.jpg

Hi,

Thanks for getting back to me, after looking into this a bit more I see what is happening. When you use Guided Failure mode if you choose “Ignore” we don’t log the full details of the error that has occurred. To see the extra details I mentioned in the previous response, when the failure happens, pick “Fail” and you will get some more logging.

Us not logging the extra information is a bug. I’ve created an issue here that you can track.

Again, please get back in touch if this doesn’t give the information you need.

Mark

Ok that’s clear – next time when it happens I’ll click Fail to get more logging

116091409092102231.jpg

116091409092102431.jpg

116091409092102631.jpg

116051209153905227.jpg

116091409092101931.jpg