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: Get Messages function of Get Mail
Topic Summary:
Created On: 10/18/2016 01:20 PM
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.
 10/18/2016 01:20 PM
User is offline View Users Profile Print this message

Author Icon
StuDent
Student (5-19 posts)

Posts: 6
Joined: 10/13/2016

1.) Version of AutoMate - 9.0.4.5
2.) Version of Windows - windows 7

 

I'm having trouble understanding the get messages function. I should be able to populate more than one data-set, i.e. grab more than one email, but I can't seem to figure out how. Also, when I set it to remove emails after retreival, this does not happen.

I won't post my code since the large part of it is unnecessary, but the gist of it:

 

I'm trying to read emails, loop through the body, and parse the data. But I need to be able to read any emails with a certain subject that come into the mailbox. I can set the task to trigger once every 24 hours, and only read emails that have come in the last 24 hours, but if there's more than one waiting, I can't read both. 

 

Edit: Actually, the removal function seems to work. The issue now is that it will remove all emails that fit the filter, while only populating the most recent one into the data-set. If I could get it to only remove the email it populates with, I would be golden.



 Category Survey
AutoMate 9 version:
Windows version:


Edited: 10/18/2016 at 01:30 PM by StuDent
 10/18/2016 02:30 PM
User is offline View Users Profile Print this message

Author Icon
Justin Aucoin
HelpSystems

Posts: 360
Joined: 02/15/2016

Hi StuDent,

Each email will be one row of the dataset. You can loop the dataset to access and use each row, or write the dataset to an excel file.

 Category Survey
AutoMate 9 version:
Windows version:


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

Justin Aucoin | Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700 | F: +1.213.738.7665
 10/19/2016 06:47 AM
User is offline View Users Profile Print this message

Author Icon
StuDent
Student (5-19 posts)

Posts: 6
Joined: 10/13/2016

Thank you!

I knew it was something simple that I was missing.

So for example if I have a dataset set_mail, it contains two entries/emails.

How would I go about looping through the bodies of the emails?

if I put %set_mail(%loop_count%).body%, it throws me a "expected )" error.

 

edit: my issue was that there is only one set of % required. remove the %'s around loop_count and it seems to work.



 Category Survey
AutoMate 9 version:
Windows version:


Edited: 10/19/2016 at 07:17 AM by StuDent
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 977 guests browsing this forum, which makes a total of 977 users using this forum.

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

Sitemap Network Automation Software Blog