Special Character on Password
RichardKBR opened this issue · comments
Describe the bug
Using a special character ¨ (umlaut) in password cause authentication error.
Platform:
- OS: Windows 11 Pro
- .NET Framework: 4.6.1
- MailKit Version: 2.15.0
Exception
Authentication Exception (535 5.7.3 Authentication unsuccessful)
To Reproduce
Steps to reproduce the behavior:
- Put in youre test account password a character ¨ (umlaut)
- Try to send email
Please upgrade. 2.15 is years out of date and there won't be any updates to 2.x
Thx ill test!
Make sure to add this line of code to your program's startup logic:
System.Text.Encoding.RegisterProvider (System.Text.CodePagesEncodingProvider.Instance);
Then, when authenticating to your SMTP server, use the Authenticate() method that allows you to pass a System.Text.Encoding parameter to tell MailKit which encoding to use when encoding your password.