SMTP error while sending mail

Hi Team,

I am Prabhjot working on Octopus Deploy. I am using SMTP to send notification mail in octopus deploy and getting below error.

The step failed: Activity NotifyStatus on the Octopus server failed with error ‘The smtpclient is not connected’

Can you please let me know what would be the issue and where should I check the issue is.

Thanks,
Prabhjot

Hi Prabhjot,

Thanks for getting in touch!

The error suggests that there may be a communication issue better the Octopus server and your SMTP server.

Have you been able to send send emails within Octopus before?

If you check the SMTP settings within Octopus are you able to successfully send a test email?

Regards,
Paul

Hi Paul,

Thanks for the reply. Yes, test mail is working fine and before it was working fine using send an email step, but today it is showing the above error.

Please let me know what would be the issue

Thanks,
Prabhjot

What changes have been made since the last time it worked?

If the test email is working fine then it could be that the email content that you’re trying to send with this step has a problem.

If you create a new project and add just the send an email step and run that does it work?

Hi Paul,

I tried with new project and only send an email step without any content and it is working fine.

And I have not changed any content on my projects which were working fine before and now showing error.

Moreover, it shows error sometimes and sometimes not.

Thanks,
Prabhjot

If the issue is intermittent, then it may be worth checking the logs on your SMTP server to see if it is encountering any errors at those times.
You could also inspect the network logs for any devices between the Octopus Server and the SMTP server to check for any errors there.

Hi Paul,

I checked the SMTP logs and the issue is when the mail step takes more time to send an email the deployment fails and the mail is sent. Is it possible to increase timeout so that send a mail step doesn’t fail in the process .

Thanks,
Prabhjot

Hey @prabhjotkour.91,

Just jumping in for Paul who is currently on PTO, we have been discussing this in our daily support meeting and we don’t think there are any specific places you can increase the timeout for the SMTP email step in Octopus. I have asked our engineers if they know a way to do this but I do not think this is possible in Octopus itself, there may be a script you can run to increase that timeout but if there is one the engineers would know so I will get back to you if they know of any workarounds for you regarding this.

Kind Regards,
Clare

Hey @prabhjotkour.91,

Sorry for the double post here but I am wondering if you had seen the SMTP timeout settings in the UI at all? (This may be under Configuration on your instance if you are not on 2023.2 yet, for me its under the configuration cog on the right)

Can you try changing that setting to see if that helps alleviate the issue?

I look forward to hearing from you,
Kind Regards,
Clare

We are seeing a similar issue. We failed to get some certificate expiry messages (these had always worked previously) and the Test SMTP email fails in the same manner as described above. I have tried changing the timeout from 12secs to 30secs with no effect.

Hi Andy,

In the issue above, the test email was working, and the timeout was only occurring intermittently.

As your test email is failing outright, the problem may be different.
It would be worth reviewing your SMTP server logs to see if they provide additional detail.

Regards,
Paul

Hi Paul, my bad - you were right - it was access rights to the mail server

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.