How do you download an email attachment with Cozy Roc?

438 views
Skip to first unread message

Jason Merten

unread,
Jun 27, 2011, 3:13:14 PM6/27/11
to CozyRoc
Hello,

I am using Cozy Roc with SSIS and I am wanting to use the Receive Mail
Task to download an email attachment. I am not really sure where to
get started and was curious if anyone had any ideas?

Thanks!

Ivan Peev

unread,
Jun 27, 2011, 3:39:05 PM6/27/11
to CozyRoc
Hi Jason,

Downloading of email attachment is done in 4 steps:

1. Setup Receive Mail Task task with 'Get mails list' action . Specify
the criteria you want to use to retrieve the required emails. Set
package variable where you want to store the list (type Object).
2. Setup standard 'For Each Loop' container to iterate over the list
from step 1.
3. Inside the loop container , insert 'Receive Mail Task' with 'Get
mail' action. For MailVariable parameter set to the current iterated
item you have set in step 2. Setup local file name where to save the
email .eml file.
4. Inside the loop container, insert 'Receive Mail Task' with 'Open
mail' action. For Local parameter set to the local parameter you have
set in step 3. Specify for Attachment parameter the folder where you
want to store the email attachments.

I would also recommend you review the sample packages linked at the
bottom of the 'Receive Mail' Task documentation page here:

http://www.cozyroc.com/ssis/receive-mail-task

Jason Merten

unread,
Jun 27, 2011, 4:42:05 PM6/27/11
to CozyRoc
Hi Ivan,

I have gotten it to correctly download the email, but it will not save
the attachment. Any ideas?

Thanks,
Jason

Ivan Peev

unread,
Jun 27, 2011, 4:43:40 PM6/27/11
to CozyRoc
Jason,

What did you specify for Attachment parameter? You have to specify
folder name.
Reply all
Reply to author
Forward
0 new messages