mimekit.parseexception:偏移18时意外令牌

发布于 2025-01-27 00:35:17 字数 1070 浏览 2 评论 0原文

我有 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 server

  • Email that contains dot(".") is working

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

橙幽之幻 2025-02-03 00:35:17

我将Mimekit从2.6升级到3.2,现在正常工作。

I upgraded MimeKit from 2.6 to 3.2 and its working properly now.

坏尐絯℡ 2025-02-03 00:35:17

如果电子邮件地址中有白色空间,则可能发生此错误

If there are white spaces in the email address this error can happen

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文