Downloading Messages with Attachments from Gmail

I have issues attempting to download from Gmail using the Pop3Client class.

In a POP3 telnet session ([pop.gmail.com](http://pop.gmail.com/) 995 +SSL):

+OK Gpop ready for requests from [ADDRESS]
USER [EMAIL]
+OK send PASS
PASS [PASSWORD]
+OK Welcome.
RETR 1
+OK message follows

RETR 2
+OK message follows

RETR 3
+OK message follows

This all proceeds how I would expect, with messages 2 and 3 having attachments, and each RETR command dumping the message as-is.

But with the following code, I download incomplete messages:

using (var client = new Pop3Client(“[pop.gmail.com](http://pop.gmail.com/)”, “[EMAIL]”, “[PASSWORD]”))
{
client.Port = 995;
client.SecurityMode = Pop3SslSecurityMode.Implicit;
client.EnableSsl = true;
client.Connect();
client.Login();

// The server must implement this command
var nummessages = client.GetMessageCount();

for (int i = 1; i <= nummessages; i++) // 1-based index for messages
{
try
{
using (var eml = client.FetchMessage(i))
{
eml.Save(@"Email " + i + “.eml”, Aspose.Network.Mail.MessageFormat.Eml);
eml.Save(@"Email " + i + “.msg”, Aspose.Network.Mail.MessageFormat.Msg);
}
}
catch (Pop3Exception ex)
{
Console.WriteLine(“Error retrieving message: {0}”, i);
Console.WriteLine(ex.ToString());
}
}

// client.Quit();
// client.Disconnect();
}
For the e-mails above, only E-mail #1 comes through completely (it has no attachments). For #3, I open the resulting EML file and find:

MIME-Version: 1.0
Date: 12 Mar 2010 16:48:56 -0100
[End of file]
So, something with attachments seems to be amiss.

Hi,

I can also reproduce this issue with Gmail at my end. I have also logged this issue in our bug tracking system (ID: 15129). We will notify you as soon as we make some progress to fix this.

Thank you.

I am reproducing this problem with Exchange POP3, too.

Similarly, I get an error saying something like:

Aspose.Network.Pop3.Pop3Exception: Command failure. The server response was: StatusCode: Error, Response: Received: from exchange.[DOMAIN] ([[ADDRESS]]) by exchange.[DOMAIN]
([[ADDRESS]]) with mapi; Tue, 16 Mar 2010 12:14:47 -0700

It looks like the error text is actually a part of the valid response from a RETR of the message.

Do you have an ETA for when this can be resolved? Unfortunately grabbing attachments is the sole reason I want to use the toolkit for.

Thanks!

Hi,

Hopefully, this issue would be resolved by next week. We will inform you as soon as it is fixed.

Any update on the status of this issue? Thanks!

Hi,

This issue has been resolved. We are going to publish a new release soon. You will be notified when the new release will be published.

The issues you have found earlier (filed as 15129) have been fixed in [this update](http://www.aspose.com/community/files/51/.net-components/aspose.network-for-.net/entry229369.aspx).

This message was posted using Notification2Forum from Downloads module by aspose.notifier.

Great! Thanks a lot!