Invalid local-part at offset 0

See original GitHub issue

Hello,

I am getting just another error with “Invalid local-part at offset 0” Using the code:

public class EnvelopeShould
{
    [Fact]
    public void Parse()
    {
        var rawEnvelope =
            "(\"Tue, 23 Dec 2014 17:03:26 +0100\" \" Merry Christmas!\" ((\"Firstname LastName\" NIL \"f.lastname\" \"ex.com\")) ((\"Firstname LastName\" NIL \"f.lastname\" \"ex.com\")) ((\"Firstname LastName\" NIL \"f.lastname\" \"ex.com\")) ((NIL NIL \"\" \"localhost\")) NIL NIL NIL \"<D1329FAF41FC457FA57F0427E6AEB5E0@example.com>\")";

        var parsed = Envelope.TryParse(rawEnvelope, out var envelope);
        Assert.True(parsed);
    }
}

Seems like this part is making issue: ((NIL NIL "" "localhost"))

if I change it to ((NIL NIL "localhost" "localhost"))

it works fine… however have no idea about details here. Envelope is received from IMAP server. Any advice?

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
jstedfastcommented, Nov 28, 2022

okay, thanks, I see what is happening…

0reactions
mantasaudickascommented, Nov 28, 2022

Actually we have the same error from 2 clients:

("Wed, 04 Nov 2015 03:44:46 +0000" "Daily Digest | Nov 3, 2015" (("SumAll" NIL "noreply" "sumall.com")) (("SumAll" NIL "noreply" "sumall.com")) (("SumAll" NIL "noreply" "sumall.com")) ((NIL NIL "f.lastname" "userdomain.com")) ((NIL NIL "" "localhost")) ((NIL NIL "" "localhost")) NIL "<hashcode@anotherhashcode.sendgrid.net>")

and

("Thu, 14 Apr 2016 12:04:00 +0000" "The new season is coming..." (("RAF News" NIL "" "localhost")) NIL NIL NIL NIL NIL NIL "<DB3PR05MB077871F726AB0A00C107D8F3857D0@DB3PR05MB0778.example.com>")
Read more comments on GitHub >

github_iconTop Results From Across the Web

MimeKit.ParseException: Invalid local-part at offset 0 on ...
This just started getting an exception being thrown from inside of Imap.ImapFolder.Fetch() with my gmail account. See below.
Read more >
Error Save Email Message + Invalid local-part at offset 0 ...
The address string that you pass to should be in its canonical form. For example, a leading space would be an invalid format...
Read more >
mimekit - Unable to parse tnef part from MimeMessage
1 Answer. This just means that the "email address" in one of the TNEF fields is not a valid email address (syntactically). It...
Read more >
Exception query is not created when sending eReceipts to ...
Users may receive "“Error: Invalid local-part at offset 0” which indicates an invalid or incorrectly formatted email address that must be corrected to ......
Read more >
Email error: Invalid addr-spec token at offset 0 (V4.3)
Hi, the email is configured correctly but keeps showing this error in the log and the test email: Invalid addr-spec token at offset...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found