ph_processemailthread PowerHome Formula function
Description
Processes and executes any Control Email (in a separate helper application) using the default MAPI client.
Syntax
ph_processemailthread ( type, seconds )
Argument Description
type An integer representing the method to launch the process email heper application. A value of 0 will launch the helper application for processing and causes the function to return a 0 immediately with no knowledge of whether the processing was successful or not. A value of 1 will launch the helper application but cause the function to wait up to the specified number of seconds and return an error code indicating success or not.
seconds The maximum number of seconds to wait when processing email with a type of 1.
Return value
Integer. If the processing type is 0, the function will always return 0. If the type is 1, the function will wait up to the number of seconds specified in the seconds parameter. Returns a 0 if successful. Returns a 1 if an error occurs while logging into the mail system. Returns a 2 if an error occurs while retrieving email. Returns a 3 if an error occurs while reading the envelope. Returns a 4 if an error occurs while reading the message. Returns a 5 if an error occurs while deleting the email. Error values of -1 thru -5 are equivalent to their positive counterparts but means that the function timed out while waiting for the MAPI client to respond. This most likely means that the MAPI client helper application is hung waiting for some form of user response.