Reputation: 636
I am trying to send an email to an email address: coordinació[email protected] that contains special characters using Mailkit via a mail server that has the SMTPUTF8 extension enabled ( have double checked the same by sending a sample test email from a shell script).
Mailkit reports the exception as "The SMTP server doesn't support the SMTPUTF8 extension", is there something I should be doing to encode the email address differently ?.
I have tried using UTF-8 encoding for the MailboxAddress constructor but the results are the same. Please find the protocol log for the same.
Connected to smtp://mail5xx.xx.xxxxx.com:25/?starttls=when-available
S: 220 mail5xx.xx.xxxxx.com ESMTP service ready
C: EHLO [192.xxx.xx.xxx]
S: 250-mail5xx.xx.xxxxx.com says hello
S: 250-ENHANCEDSTATUSCODES
S: 250-PIPELINING
S: 250-CHUNKING
S: 250-8BITMIME
S: 250-AUTH CRAM-MD5 PLAIN LOGIN
S: 250-AUTH=CRAM-MD5 PLAIN LOGIN
S: 250-XACK
S: 250-SIZE 0
S: 250-VERP
S: 250 DSN
Edit: This is no longer a problem for me if I use Mailkit 1.1.4 ( thanks to Jeff for that quick patch), apparently some of the mailservers can send UTF mails even if they don't have the SMTPUTF8 extension enabled, which is strange.
Upvotes: 1
Views: 1063
Reputation: 38528
Based on the server response to the EHLO
command, it does not support the SMTPUTF8
extension.
Note that if it did support it, then it would be listed in the response like so:
C: EHLO [192.xxx.xx.xxx]
S: 250-mail5xx.xx.xxxxx.com says hello
S: 250-ENHANCEDSTATUSCODES
S: 250-PIPELINING
S: 250-CHUNKING
S: 250-8BITMIME
S: 250-AUTH CRAM-MD5 PLAIN LOGIN
S: 250-AUTH=CRAM-MD5 PLAIN LOGIN
S: 250-XACK
S: 250-SIZE 0
S: 250-VERP
S: 250-DSN
S: 250 SMTPUTF8
Upvotes: 2