Gmail File Attachment Issue
Keywords: kGetMail Postie Gmail File Multiple Attachment Attachments Switched Flipped Swapped
This issue has been addressed in Postie Extender version 44048.
When using kgetmail with a specified outputfile on a gmail address to retrieve an email with more than one attachment, it returns the text of the email to the output file in the current directory (as expected), but the attachments
arrive with file names swapped. It does this both pop3 and imap. I do have the latest version of the extender.
If I attach "file1.jpg" and "file2.jpg", the files that arrive in my current directory are named incorrectly. "file1.jpg" will have the content from "file2.jpg" and so on. Three and four and more files also do the same thing.
Have not identified a pattern, but it is very easy to reproduce.
Note: c:\temp\attach is a valid and empty directory.(User ids and passwords changed to protect the innocent.)
curdir = "C:\temp\attach\"
host = "pop.gmail.com"
fromaddr = "email@example.com"
userid = "firstname.lastname@example.org"
password = "herenorthere"
flags = ""
kInit( host, fromaddr, userid, password, "", "TLS" )
ret = kGetMail( 1, "", "", "", flags )
What email client are you using to create the email message with file attachments? Successfully tested using Windows Live Mail.
Now *that* was an interesting thought. I was using gmail web client to send the test emails. Just tested with a different (non gmail) source address and client and it worked correctly.
So, when sent from gmail to gmail and retrieved with postie, bad attachment naming.
When sent from "other" and retrieved from gmail with postie, works as expected.
When sent from gmail to gmail and retrieved with gearmage for instance, works as expected.
Upon further investigation this problem only occurs under the following circumstances when using the Postie Extender kGetMail function:
- Gmail server is used to send the email.
- The email contains both text and html.
- The email has two file attachments.
You will need to work around the issue by using MAPI to get the email instead. In order to use MAPI you must have the MAPI subsystem installed. This can be accomplished by installing an application that contains a MAPI-based subsystem, such as Microsoft Outlook. You can find information about a computer's MAPI subsystem installation in the system registry. http://msdn.microsoft.com/en-us/library/cc815368
Article ID: W17589
Filename: Gmail File Attachment Issue.txt
File Created: 2017:07:28:13:58:35
Last Updated: 2012:07:11:14:07:04