Highlighted
Respected Contributor.. Respected Contributor..
Respected Contributor..
479 views

How To Manipulate/Use imap_search Parameter

Jump to solution

Hi All,

I am writing a quick IMAP/SMTP script. I need help figuring out how to use the saved parameters.

	imap_search("",
	            "Search=SUBJECT \"BSM Monitoring For DOE Exchange Service\"",
	            "SaveTo=searchResults",
	            ENDITEM,
	            LAST);

Action.c(68): Search Results = 477 478 479 480 481 482 483 484 [18/03/2016 1:03:21 PM]

As you can see, I have results. How do I then use those results in another command (i.e imap_expunge)?

I've tried hours of googling and trying to interpret the Function Reference to no avail.

Any help greatly appreciated.

Cheers 🙂

0 Likes
1 Solution

Accepted Solutions
Highlighted
Respected Contributor.. Respected Contributor..
Respected Contributor..

Re: How To Manipulate/Use imap_search Parameter

Jump to solution

Answered my own question, I swear I had already tried this but I must have been doing something wrong.

Here is my code block for others to use as an example;

	imap_search("",
	            "Search=SUBJECT \"BSM Monitoring For DOE Exchange Service\"",
	            "SaveTo=searchResults",
	            ENDITEM,
	            LAST);
	
	lr_output_message("The results are %s:", lr_eval_string("{searchResults}"));

Thanks friends 🙂

View solution in original post

1 Reply
Highlighted
Respected Contributor.. Respected Contributor..
Respected Contributor..

Re: How To Manipulate/Use imap_search Parameter

Jump to solution

Answered my own question, I swear I had already tried this but I must have been doing something wrong.

Here is my code block for others to use as an example;

	imap_search("",
	            "Search=SUBJECT \"BSM Monitoring For DOE Exchange Service\"",
	            "SaveTo=searchResults",
	            ENDITEM,
	            LAST);
	
	lr_output_message("The results are %s:", lr_eval_string("{searchResults}"));

Thanks friends 🙂

View solution in original post

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.