mimekit.parseexception:偏移18时意外令牌
我有 Spa应用程序和ASP.NET Core 3.1 Web API 和 Mimekit 用于电子邮件服务。
用户注册服务器发送确认电子邮件,一切都可以。 但是在1个电话设备上,当电子邮件包含下划线时,服务器引发的异常。
有问题的电子邮件是“ [email  procected] “ ” 和错误,服务器the the服务器throws是:
MimeKit.ParseException: Unexpected token at offset 18
at MimeKit.MailboxAddress.set_Address(String value)
at MimeKit.MailboxAddress..ctor(Encoding encoding, String name, String address)
at MimeKit.MailboxAddress..ctor(String address)
我很奇怪的是,我奇怪的是通过PC VIA CHROME CHROMES CHROME ROWSER ROWSER ROWSER ROWSER ROWSER MORLOWSE,用于远程调试的开发工具以及我通过PC浏览器模拟器进行的工作。
请注意:
电子邮件是18个字符,因此基本上失败了,
- https帖子中发送的,并且
emboth the the https post and the the and
在服务器上
包含dot(“。”)的电子邮件正在工作
I have SPA application and asp.net core 3.1 web api and MimeKit for email service.
When user register the server sends confirmation email and everything is okay.
But on 1 phone device the server throws exception when the email contains underscore.
The problematic email is "[email protected]" and the error that server throws is:
MimeKit.ParseException: Unexpected token at offset 18
at MimeKit.MailboxAddress.set_Address(String value)
at MimeKit.MailboxAddress..ctor(Encoding encoding, String name, String address)
at MimeKit.MailboxAddress..ctor(String address)
The weird part is that I connected the phone browser to my pc via chrome dev tools for remote debugging and when I did via pc browser emulator its working.
Note that:
the email is 18 chars longs so it basically fails on the and
The email is sent with https post in body and it is logged properly
on the serverEmail that contains dot(".") is working
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我将Mimekit从2.6升级到3.2,现在正常工作。
I upgraded MimeKit from 2.6 to 3.2 and its working properly now.
如果电子邮件地址中有白色空间,则可能发生此错误
If there are white spaces in the email address this error can happen