g4gmail_getMessage

*//////////////////////////////////////////////////////////////*

* g4gmail_getMessage - Retrieve the email message. This *

* will populate the message header, *

* body and part files. *

* *

* Output: *

* out_errMsg - The error message (if error exists). *

* *

* Returns: *

* -1 for error, 0 for success *

* *

* Settable Variables ([r]=required) *

* id - Google ID [r] *

* message_id - Message ID [r] *

* get_parts - Retrieve the message parts (*YES, *NO) *

* temp_dir - Temporary Directory for email files (/tmp) *

* ccsid - The CCSID to use (1208) *

* debug - Turn on Debug (*NO, *YES) *

* debug_file - The debug file name. *

* (/tmp/g4g_[id]_[msgid]_getMessage.txt) *

* *

*//////////////////////////////////////////////////////////////*

g4gmail_getMessage will retrieve the message and fill the mail parts. This is called internally by the g4gmail_listMessages procedure.

Returns: 0 for success or -1 for error.

Optional Parameters:

  • Error Message (output) - Error message

Settable Variables (use g4gmail_setValue):

  • id (required) - Your Google ID

  • message_id (required) - The message ID of the message to retrieve.

  • get_parts - Specify *YES or *NO to retrieve the parts of the message. If you will be retrieving the attachments as well this needs to be *YES.

  • temp_dir - Specify the fully qualified path to a directory in the IFS where the email part files will be placed. The default is /tmp.

  • ccsid - The CCSID to use. The default is 1208.

  • debug - Specify *YES to turn on debug, or *NO to turn off debug. The default is *NO.

  • debug_file - Specify the fully qualified file name for the main debug file. The default is /tmp/g4g_[id]_[msgid]_getMessage.txt.