Email recipient - invalid char '&'

Hello there,
I use in a variable some mailboxes and I have noticed that I couldn’t receive the notification email (it’s the final step in my workflow) for one of them, even if Octopus says everything was fine.
When you use the ‘&’ char in an email recipient, Octopus translate the symbol wrongly when replaced using the variable. It looks like the ‘&’ chars become an escape char (\u### or something close to this).
I don’t know if this is a bug or not.
Best Regards.
Lucio

Hi Lucio,

Thanks for getting in touch! I’m sorry you’re hitting this behavior. Unfortunately I haven’t been able to reproduce this in my local instance. Is the & symbol in the email address itself, or are you using it to separate multiple email addresses? If you’re using it to separate between addresses, then you would want to use a comma (,) instead.

Could you provide a screenshot showing how you’ve defined this variable?
Which version of Octopus are you currently running?

I look forward to hearing back and getting to the bottom of this one!

Kind regards,

Kenny

OctoLog
OctopusVar

Hello Kenneth,
screenshots uploaded. One is from the Octopus variable, the other one from the TaskLog.
You can see that the ‘&’ has been replaced with \u0026.
Regards.
L.

Octopus v 2018.3.11

Hi Lucio,

Thanks for following up and providing those additional details. Unfortunately I’m still unable to reproduce this behavior in 2018.3.11 when defining email addresses as you’ve done in a variable. I use the standard substitution syntax (#{addresses}) and it encodes correctly and sends the email to the intended recipients. The \u0026 is unicode for the ampersand character, so this is a bit mysterious.

How are you binding this variable in the To field of your email step? Could you provide a screenshot of that and of the variable name itself? I’ll be happy to attempt reproducing this behavior again. :slight_smile:

I look forward to hearing back and getting to the bottom of this one!

Kind regards,

Kenny


Hello Kenny,
thank you for your replies.
The “email success deployment” step screenshot is attached.
The variable configuration is in one of the screenshot I have sent on the 24th of May.
Thak you for your time.
Regards.
L.

Hi Lucio,

Thanks for following up and clarifying that for me. I’ve done some additional testing with no luck, so I’ve brought this up with my team. We’ve confirmed that the & is read back out as an ampersand (not converted to unicode). It comes through with the ampersand via SMTP, but it’s encoded in the raw log file, so it should be working as expected during the deployment.

Could you test your SMTP configuration with the Save and Test option to send an email to this email address? This is located in your web portal under Configuration > SMTP. Can you also check your spam filters?

I hope this helps narrow down the issue! Let me know how you go and if you have any further questions. :slight_smile:

Kind regards,

Kenny

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