Send Email Notification step not firing

Hi,

In Octopus (3.14.1), I have configured SMTP and all other settings to send mail. The Email subscription are received correctly at defined interval.

However, I have defined a Send Email step in a project’s deployment process but we never receive notification for that. The user group is same for both subscription and email step.

Configuration step:

  1. Created a users group and added users.
  2. Create a “Send an Email” step template. (screenshot attached).
    a. Step template - because I want to add it to more than 1 project.
    b. Body copied from - https://octopus.com/docs/v/3.14/deploying-applications/deployment-process/steps/email-notifications
  3. In project process added a step (screenshot attached).
  4. Step details added (screenshot attached).

Deployment happens for the project but no mail is triggered.

Logs only show this. - which Makes sense because octopus checks for updates and we have internet disabled on octopus server.
Failed checking for updates
System.Net.WebException: The remote name could not be resolved: ‘octopusdeploy.com
at System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request)
at System.Net.WebClient.DownloadString(Uri address)
at Octopus.Server.Schedules.CheckForOctopusUpgrades.CheckForUpdates()

Where do you suggest we look into?

Hi Nikihil,

Thank you for getting in touch. Could you send me the deployment task log for the deployment? Any errors and messages related to email sending would be in that step.

Also check that the users in that group have an email address configured.

Rob W

Hi Rob,

Thanks for replying.

PFA deployment logs and task completion status screenshot. Logs suggest as if email notification step is completely absent.

Cheers.

Deployment_status.jpg

ServerTasks-5964.log.txt (11 KB)

Hi Nikhil,

After adding the email step, did you create a new release? When a release is created, it snapshots the deployment process so that the deployment process is the same on every deployment.

Rob W

Hey,

OK so that’s how this works. Thanks for clarifying. Created a new release and it started working.

2 more things

  1. In my team we have addresses stored as Firstname.Lastname@company.com.
    a. In Octopus are User’s email address’s case sensitive? Do we need to change them to lowercase?
    b. What will happen to emails if a user email address does not confront to email address rules - I was able to save nikhilfpt@foo.com@bar.com

  2. I have setup Email subscriptions for a group (2 users - me and my colleague with lowercase email names) I receive mail but my colleague doesn’t and this is the task error.

‘Email Subscription’ failed to send emails.
You do not have permission to perform this action. Please contact your Octopus administrator. Missing permission: EventView
Octopus.Server.Web.Infrastructure.Security.OctopusSecurityException: You do not have permission to perform this action. Please contact your Octopus administrator. Missing permission: EventView
at Octopus.Server.Web.Infrastructure.Security.OctopusPrincipal.NotAllowed(Permission permission, String helpText)
at Octopus.Server.Web.Infrastructure.Security.OctopusPrincipal.VerifyAuthorizedFor(Permission permission, String[] documentIds)
at Octopus.Server.Web.Infrastructure.Security.ScopedPermissionRequiredRule.Customize[TModel](IQueryBuilder1 query, ISpecialRuleContext context) at Octopus.Server.Schedules.EventNotifications.NotificationCreator.ProcessEmailNotifications(IRelationalTransaction transaction, Subscription subscription, IQueryBuilder1 eventsQuery, DateTimeOffset lastProcessed, DateTimeOffset processingDate, ServerConfiguration serverConfiguration)
Octopus.Server version 3.14.1 (3.14.1+Branch.master.Sha.049dc8b803e85d5e1e88c43985a6e44172ac5528)

Hi Nikhil,

We use the .NET SmtpClient to send emails. In a large part how invalid email addresses are handled is dependent on your SMTP server. In general email addresses are not case sensitive, but that does depend on the receiver’s SMTP server.

Since the subscription email message contains “Event” information, your colleague will need the EventView permission.

Rob

Thanks Rob. All sorted now. You can close the ticket pls.