Highlighted
Absent Member.. Absent Member..
Absent Member..
252 views

pop3 - inbox message count with vugen script

I have this script:
Action()
{
// Logon to the POP3 server

pop3_logon( "Login", "URL=pop3://F_Billing_Web:xx@test.lan",
LAST );



// List all messages on the server and receive that value

totalMessages = pop3_list("ListParam","List_Messages", LAST );

// Display the received value (It is also displayed by the pop3_list function)

lr_log_message("There are %d total messages on the server.\r\n\r\n", totalMessages);

// Retrieve all messages on the server without deleting any of them

pop3_retrieve("POP3", "RetrieveList=ALL", "DeleteMail=false", LAST );

// Logoff

pop3_logoff();

return 0;
}

I keep getting an error that says "undeclared identifier 'totalMessages' ... what am I missing?
Thank you.
cmaicke
0 Likes
2 Replies
Highlighted
Absent Member.
Absent Member.

Re: pop3 - inbox message count with vugen script

Every variable you use needs to be declared first. Place this at the begining of the action section:

long totalMessages;
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: pop3 - inbox message count with vugen script

added int totalMessages; after Action.
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.