I'm getting the following errors when trying to send an email to a recipient with extended ASCII characters, on my Postfix server, using PowerShell or the System.Web.Mail.SmtpMail .NET class:
The client or server is only configured for E-mail addresses with ASCII local-parts: livelink+264096812$£&@mytenant.onmicrosoft.com
The server rejected one or more recipient addresses. The server response was: 500 5.5.2 Error: bad UTF-8 syntax
The british pound sign "£" is most probably the culprit, as it is the only non 7-bit/extended ASCII char.
I've searched high and low for practical examples of how to use extended-ASCII chars in recipient addresses, but nothing seems to work. I know it's doable since I can send an email successfully to that mailbox from Outlook. But I can't from a PowerShell command line. My Postfix server is up-to-date and configured with 8BITMIME and SMTPUTF8 support.
I would greatly appreciate some help !
For those having the same issue, I was able to send an email to a non-ASCII recipient by forcing the use of SMTPUTF8 in my SMTP client. In my case, I had to use the
System.Net.Mail.NET class in a PowerShell function, since neither the built-inSend-MailMessagecmdlet nor theSystem.Web.Clientclass offer this option (and both are deprecated anyway).It's also possible with MailKit