martincl

download attachments with map

2 posts in this topic

Hello,

I see that I can download the attachment name with the IMAP connection.  Can I get the actual attachment file downloaded to a container?

Thanks

Marty

Screen Shot 2017-03-18 at 9.53.59 AM.png

Share this post


Link to post
Share on other sites

Hi martincl,

You can get the actual attachments into a container field. However, the example file is not currently set up to do this. In order to do this, you need to set "attachments=true" in the EmailReadMessages function call. This will tell the email plugin to download the attachments. When iterating through the emails, you will call EmailGetMessageValue("attachments"). This returns a return-separated list of paths to the attachments. You will then need to loop through that list and call Set Field(table:myfield;EmailReadAttachment(path)) to put the attachment into a container field.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Similar Content

    • By samarthmkt
      How we can send email with attachment while sending through 360 email plugin . Need any script for this. Thanks
    • By Fred Rogers
      Where to start.

      We are now getting important client information e-mailed to us in the form of attachments.
      The attachments have the clients name and a reference number in the file name. ie Smith, John, 1234567.pdf

      What I would like is to forward the email message based on the attachment name, inducing the orignal attachment.

      Or what would be even better if I could download the attachments, put them in a clients folder then e-mail the staff member alerting them that a clients files have been updated.

      Right now I have a server script that runs every 15 minutes to get the mail.
      I can see the attachment names, but I am unsure how to work with the files.

      Thanks!

      -=fred=-
    • By andru
      I'm working with a Go database and trying to email a pdf copy of a FM layout.

      I'm able to save the FM layout as a pdf without any problem and I'm able to then email a message from Go to an external email but I'm not able to get the saved pdf to attach to the email.

      I can see the saved pdf file in my files on the iPad and I can open it on my desktop, so I know that part worked.

      I'm suspecting that I haven't set the file path correctly in the attachment options. Any advice appreciated.
    • By rickyd
      Hi all,

      We just bought the 360works E-mail plugin, and we're having some trouble getting attachments to work properly. The script which is sending e-mails is supposed to pull attachments from a container field (Emails::attach1). And it does...sort of.

      The e-mail sends successfully, and contains an attachment. Except that the attachment is a .jpeg of what the container field LOOKS like, not a copy of the file it contains. I've tried this with .txt files, .zip files, .doc files, etc. Every time, I just get a picture of what the container field looks like.

      When sending documents, I get an image of the first page of the document.

      Any ideas what I'm doing wrong? Below is the line in the script that is doing the attachment. Platform is Windows 7 x64, Filemaker 10.3 Pro, E-mail plugin v. 1.96.

      Set Variable $emailattach = EmailAttachFile( Emails::attach1 )

      Any ideas?

      Thanks in advance.

      -RD