WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Postie

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Gmail File Attachment Issue

 Keywords: kGetMail Postie Gmail File Multiple Attachment Attachments Switched Flipped Swapped 

UPDATE:

This issue has been addressed in Postie Extender version 44048.


Question:

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\"
DirChange(curdir)
AddExtender("WWPST44I.DLL")
host = "pop.gmail.com"
fromaddr = "user@gmail.com"
userid = "user@gmail.com"
password = "herenorthere"
flags = ""
kInit( host, fromaddr, userid, password, "", "TLS" )
ret = kGetMail( 1, "", "", "", flags )
Pause("kGetMail(Result)", ret)
Exit

Answer:

What email client are you using to create the email message with file attachments? Successfully tested using Windows Live Mail.

User reply:

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.

Answer:

Upon further investigation this problem only occurs under the following circumstances when using the Postie Extender kGetMail function: 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: 2012:07:11:14:07:04
Last Updated: 2012:07:11:14:07:04