Network Automation Software We are currently migrating this forum
over to our HelpSystems domain. Please
post all new threads in our new
HelpSystems Community Portal.
Post to the HelpSystems Forum
You are not currently logged on. You must be logged on in order to post. Log on
Or Create a new account
AutoMate Discussion
Decrease font size
Increase font size
Topic Title: Reading multiple attachments from email dataset
Topic Summary:
Created On: 07/26/2018 06:36 AM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
Answer This question was answered by MariusEriksen, on Friday, July 27, 2018 12:10 AM

Answer:
Thank you

I implemented a new loop to handle the possibility of multiple attachments:
<AMLOOP TYPE="LIST" LIST="%mailinfo.Attachments%" RESULTVARIABLE="at" DELIMITER="new_line">
<AMSHOWDIALOG>%at%</AMSHOWDIALOG>
</AMLOOP>
 07/26/2018 06:36 AM
User is offline View Users Profile Print this message

Author Icon
MariusEriksen
n00b (>6 posts)

Posts: 4
Joined: 06/09/2016

Hi

I have encountered a problem with processing multiple attachments from emails.

What works:
I can without problem download mutiple attachments from any number of emails as long as there is only 1 attachment per email.

Problem:
When there is more than one attachment in 1 email I can't separate them into individual filenames.

I am using this command for downloading:
<AMEMAIL ACTIVITY="all_messages" SESSION="Email" RESULTDATASET="Mailinfo" REMOVEMESSAGE="YES" ATTACHMENTDEST="%FileTempFolder%" HASATTACHMENT="yes" HASBEENREAD="no" />

Then I can loop through %Mailinfo.Attachments% for the files. But if an email contains 2 files the variable %Mailinfo.Attachments% contains both filenames.

So the question is: How do I separate the filenames in %Mailinfo.Attachments% ?

 Category Survey
 07/26/2018 04:09 PM
User is offline View Users Profile Print this message

Author Icon
Leonard Amabile
HelpSystems

Posts: 5454
Joined: 05/15/2007

Hi Marius,

The attachments field is new line delimited. You can loop through the contents of the field using a new line as the delimiter and prefix the file name with the folder location.

 Category Survey


-------------------------

Leonard Amabile | Director, Cross Platform Support
AutoMate | InterMapper | Skybot | Divisions of HelpSystems
T: +1.213.738.1700 | F: +1.213.738.7665
 07/27/2018 12:10 AM
User is offline View Users Profile Print this message

Author Icon
MariusEriksen
n00b (>6 posts)

Posts: 4
Joined: 06/09/2016

Answer Answer
Thank you

I implemented a new loop to handle the possibility of multiple attachments:
<AMLOOP TYPE="LIST" LIST="%mailinfo.Attachments%" RESULTVARIABLE="at" DELIMITER="new_line">
<AMSHOWDIALOG>%at%</AMSHOWDIALOG>
</AMLOOP>

 Category Survey
Statistics
18258 users are registered to the AutoMate Discussion forum.
There are currently 0 users logged in.
The most users ever online was 5551 on 01/08/2018 at 11:11 AM.
There are currently 508 guests browsing this forum, which makes a total of 508 users using this forum.

FuseTalk Enterprise Edition v4.0 - © 1999-2019 FuseTalk Inc. All rights reserved.

Sitemap Network Automation Software Blog