Code Monkey home page Code Monkey logo

Comments (6)

NiKiZe avatar NiKiZe commented on July 20, 2024

Can you provide the full error message, including the stacktrace?

from s22.imap.

lampo1024 avatar lampo1024 commented on July 20, 2024

Hi,
I downloaded and compiled the new version,this issue is resolved,but encountered a new problem.
There are spaces in the address of sender(for example:"First name" example@domain. net[Note:There is a space between domain. and net]),I can't get the from address in my app. I debug the code and found the following error:
The addresses parameter contains an e-mail address that is invalid or not supported.
Gmail's original message:
20130427095209

from s22.imap.

NiKiZe avatar NiKiZe commented on July 20, 2024

That is not a valid emailadress and the .net framework throws. it is impossible to populate the message From address with that address.
A notification about failed parsing or invalid address lines might be interesting for this.
See #48 for similar issue.

from s22.imap.

lampo1024 avatar lampo1024 commented on July 20, 2024

Yes, example@example. net is not a valid email address,but after remove the spaces is a valid address.So my suggestion is you can remove these invalid characters in the email address before ParseMultipleAddresses.
Because this message is actually stored in my Gmail mailbox.I just can't retrieve to local by S22.Imap.

from s22.imap.

broxinagil avatar broxinagil commented on July 20, 2024

I've a similar Problem.
I've sent a Mail to some Mail-Address, that is not known by the receiving SMTP-Server.
The Mail returned was sent by Jana2 Mail Server as "Systemadministrator" where a recipient was not known by the receiving Server. I think, that throws an "invalid character found in header value"-Exception because the From-Header has no eMail-Address ?

Headers:
X-UIDL-JANA-SERVER: 255392621.1369491686@Jana-Server
From: "Systemadministrator"
Sender: "Systemadministrator"
To: [email protected]
Subject: Unzustellbar: test
Date: Sat, 25 May 2013 16:21:24 +0200
Message-ID: 000001ce5953$23fa31c0$6bee9540$@Domain
MIME-Version: 1.0
Content-Type: application/ms-tnef;
name="winmail.dat"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="winmail.dat"
X-Mailer: Microsoft Outlook 15.0
Thread-Index: AQIWacilbO2h+QbxaliA6L/xOzdkTQ==

Exception:
System.FormatException wurde nicht behandelt.
HResult=-2146233033
Message=In der E-Mail-Kopfzeile wurde ein ungültiges Zeichen gefunden: """.
Source=System
StackTrace:
bei System.Net.Mail.DotAtomReader.ReadReverse(String data, Int32 index)
bei System.Net.Mail.MailAddressParser.ParseDomain(String data, Int32& index)
bei System.Net.Mail.MailAddressParser.ParseAddress(String data, Boolean expectMultipleAddresses, Int32& index)
bei System.Net.Mail.MailAddressParser.ParseMultipleAddresses(String data)
bei System.Net.Mail.MailAddressCollection.ParseValue(String addresses)
bei System.Net.Mail.MailAddressCollection.Add(String addresses)
bei S22.Imap.MessageBuilder.ParseAddressList(String list)
bei S22.Imap.MessageBuilder.SetAddressFields(MailMessage m, NameValueCollection header)
bei S22.Imap.MessageBuilder.FromHeader(String text)
bei S22.Imap.MessageBuilder.FromMIME822(String text)
bei S22.Imap.ImapClient.GetMessage(UInt32 uid, FetchOptions options, Boolean seen, String mailbox)
bei S22.Imap.ImapClient.GetMessages(UInt32[] uids, FetchOptions options, Boolean seen, String mailbox)
bei S22.Imap.ImapClient.GetMessages(UInt32[] uids, Boolean seen, String mailbox)

InnerException:

from s22.imap.

smiley22 avatar smiley22 commented on July 20, 2024

I know this is rather old, is this still an open issue? Looking at the code the try/catch block in ParseAddressList should take care of this or am I missing something. @NiKiZe

Just want to be sure before closing this...

from s22.imap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.