bvstone

GreenTools for Google Apps (G4G) Now Includes Function to Send Emails using MIME File

Posted:

GreenTools for Google Apps (G4G) Now Includes Function to Send Emails using MIME File

If you have GreenTools for Google Apps (G4G) licensed as well as the G4G Send Mail Addon (G4GSMAIL), you can send emails using a MIME file.

This means if you are moving from the QtmmSendMail API becaue of more secure requirements, changing the processing is quite simple.

Following is an example program to send an email using a MIME file:

     H DFTACTGRP(*NO) BNDDIR('G4G')
      ****************************************************************
      * Imports
      ****************************************************************
      /COPY QCOPYSRC,P.G4GMAIL
      ****************************************************************
     D rc              S             10i 0
     D errMsg          S            256
     D mailID          S            256
      ****************************************************************
      /free

       // Set the id of the account you wish to send an email from
       rc = g4gmail_setValue('id':'bvstone@gmail.com');
       rc = g4gmail_setValue('sendmail_mime_file':'/tmp/mimetest.txt');
       rc = g4gmail_sendMail(mailID:errMsg);

       *INLR = *ON;
      /end-free




Reply




© Copyright 1983-2025 BVSTools
GreenBoard(v3) Powered by the eRPG SDK, MAILTOOL Plus!, GreenTools for Google Apps, jQuery, jQuery UI, BlockUI, TinyMCE and running on the IBM i (AKA AS/400, iSeries, System i).