Highlighted
Absent Member.. Absent Member..
Absent Member..
822 views

VuGen MAPI Script - Check for Unread Email

Hello Experts,

I'm using the MAPI protocol to develop a script in VuGen.

Protocol: MAPI

VuGen: 11.52

Outlook: 2010

The requirement is to check the inbox & send alert if there is any unread email in the inbox.

Is there any function which we can use to achieve this? I tried using the mapi_read_nex_mail() function with Peek parameter. Eg: mapi_read_next_mail("Show=heading", "Peek=true", LAST). But not able to get the desired result.

Can you suggest me alternatives?

 

Thanks & Regards,

Ashok

0 Likes
2 Replies
Highlighted
Honored Contributor.
Honored Contributor.

Re: VuGen MAPI Script - Check for Unread Email

Hi Ashok,

Have you used correct loop condition, as example given inVuGen function reference :

do {

        // Peek at next mail (don't mark it as read)

        rc = mapi_read_next_mail("NextMail",

                "Show=all",

                "Peek=True",    

                "Type=IPM.Note",

                LAST );

    } while (rc == LR_PASS);   

Regards,
Gagandeep Malviya

If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: VuGen MAPI Script - Check for Unread Email

Hi Gagan,

Yes, I'm using the loop.

But I'm not sure we can check if a mail is read or unread from the available set of functions. 

When I run the script, it shows the state(read or unread) in the Replay log. Is there any way we can capture that & compare with a value?

Regards,

Ashok

0 Likes
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.