bvstone

GreenTools for G Suite (G4G) Now Includes Send Mail Functionality (G4GSMAIL Addon)

Posted:

GreenTools for G Suite (G4G) Now Includes Send Mail Functionality (G4GSMAIL Addon)

Update: 08/28/2019 - Google has verified the G4GSMAIL Addon

=========================================================

If you read the recent FieldExit article regarding Google updating their Privacy Policy and basically locking down certain APIs and scopes, you'll know that we were looking for a way to still allow the functionality of sending emails using GMail or G Suite with OAuth 2.0.

We recently updated GreenTools for G Suite (G4G) to include functions in the F.G4GMAIL service program that will allow you to send emails via Google's RESTful API interface.

We have also added functionality to MAILTOOL that will allow you to send using this method.  Simply register the service for your G Suite or GMail account and use the SENDWITH(*G4GSMAIL) option.

You can also use this functionality in your own programs using the g4gmail_sendMail() function.  Here is the prototype:

 *//////////////////////////////////////////////////////////////*       
 * g4gmail_sendMail - Send an Email using Gmail API             *       
 *                                                              *       
 * Output:                                                      *       
 *   out_id - The ID of the email message (if successful).      *       
 *   out_threadID - The Thread ID of the email message.         *       
 *   out_errMsg - The error message (if error exists).          *       
 *                                                              *       
 * Returns:                                                     *       
 *   -1 for error, 0 for success                                *       
 *                                                              *       
 * Settable Variables ([r]=required)                            *       
 *   id - Google ID [r]                                         *       
 *   sendmail_mime_file - The fully qualified path to the MIME  *       
 *    file of the email you want to send. [r]                   *       
 *   message_id - The message/thread ID to apply to this email. *       
 *   ccsid - The CCSID to use (1208)                            *       
 *   debug - Turn on Debug (*NO, *YES)                          *  
 *                                                              *  
 *//////////////////////////////////////////////////////////////*  
D g4gmail_sendMail...                                             
D                 PR            10i 0                              
D  out_id                      256    Options(*NOPASS)             
D  out_threadID                256    Options(*NOPASS)             
D  out_errMsg                  256    Options(*NOPASS)                  

All you need to provide is a properly formatted MIME file in the IFS and the API will do the rest.  Or, if you don't have any applications that create email MIME files the MAILTOOL application can do that heavy lifting for you.  

If you are using a 3rd party or open source email application this function will make it easy to simply plug this into your application and start using GMail functionality with your applications.

Using this application does require licensing of GETURI, the G4G base product and the G4GSMAIL addon.  If you wish to use it with MAILTOOL you will need a license for that as well.  But you will not require a MAILTOOL Plus license unless you require the functionality offered by the Plus Addon.

Google does enforce a 35MB maximum size for the entire message (after it's base 64 encoded).  That size limit is checked by G4G before attempting to call the API.  

You can see a video of the process on YouTube by clicking here.

As always, feel free to contact us with any questions.

 


Last edited 03/04/2022 at 09:55:13



Latest Posts:

QuickBooks Online - Subtotals and Discounts Frustration QuickBooks Online - Subtotals and Discounts Frustration
Posted by March 16, 2023
QuickBooks >> QuickBooks Online
Making the Switch From QuickBooks Desktop to QuickBooks Online - No Picnic Making the Switch From QuickBooks Desktop to QuickBooks Online - No Picnic
Posted by March 16, 2023
QuickBooks >> QuickBooks Online
BVSTools Software Verified on V7R5 and Power10 BVSTools Software Verified on V7R5 and Power10
Posted by December 9, 2022
BVSTools >> BVSTools Announcements
Microsoft Office 365 Servers and Random Errors Issue Microsoft Office 365 Servers and Random Errors Issue
Posted by November 14, 2022
BVSTools >> BVSTools Software Discussion >> Email Tools (MAILTOOL) Specific Discussion
Sending/Resending Emails Using a MIME File with MAILTOOL Sending/Resending Emails Using a MIME File with MAILTOOL
Posted by November 8, 2022
BVSTools >> BVSTools Software Discussion >> Email Tools (MAILTOOL) Specific Discussion
Sending an HTML Email on Your IBM i Using MAILTOOL Sending an HTML Email on Your IBM i Using MAILTOOL
Posted by November 1, 2022
BVSTools >> BVSTools Software Discussion >> Email Tools (MAILTOOL) Specific Discussion
Transferring License Keys from One System to Another Transferring License Keys from One System to Another
Posted by October 31, 2022
BVSTools >> BVSTools Software Discussion
Calculating the Size of a File Before Base64 Encoding Calculating the Size of a File Before Base64 Encoding
Posted by August 13, 2022
Programming >> RPG Programming
GreenTools for Microsoft Apps (G4MS) v9.12 Now Includes Function to Send Emails using MIME File GreenTools for Microsoft Apps (G4MS) v9.12 Now Includes Function to Send Emails using MIME File
Posted by August 11, 2022
BVSTools >> BVSTools Announcements >> GreenTools for Microsoft Apps (G4MS) Specific Announcements
GreenTools for Google Apps (G4G) v15.20 Now Supports Shortcuts GreenTools for Google Apps (G4G) v15.20 Now Supports Shortcuts
Posted by August 6, 2022
BVSTools >> BVSTools Announcements >> GreenTools for G Suite (Google Apps) (G4G) Specific Announcements
GreenTools for Microsoft Apps (G4MS) Groups Admin Authority Instructions GreenTools for Microsoft Apps (G4MS) Groups Admin Authority Instructions
Posted by July 26, 2022
BVSTools >> BVSTools Software Discussion >> GreenTools for Microsoft Apps (G4MS) Specific Discussion
GreenTools for Microsoft Apps (G4MS) v9.10 Now Includes OneDrive Functions that Work With Groups/Shared Drives GreenTools for Microsoft Apps (G4MS) v9.10 Now Includes OneDrive Functions that Work With Groups/Shared Drives
Posted by July 19, 2022
BVSTools >> BVSTools Announcements >> GreenTools for Microsoft Apps (G4MS) Specific Announcements
GreenTools for Google Apps (G4G) v15.10 Now Includes Drive Functions that Work With Shared Drives GreenTools for Google Apps (G4G) v15.10 Now Includes Drive Functions that Work With Shared Drives
Posted by July 15, 2022
BVSTools >> BVSTools Announcements >> GreenTools for G Suite (Google Apps) (G4G) Specific Announcements
GreenTools for Microsoft Apps (G4MS) v9.00 Now Offers Functions to Bypass Registration Command and BVSTools Landing Page GreenTools for Microsoft Apps (G4MS) v9.00 Now Offers Functions to Bypass Registration Command and BVSTools Landing Page
Posted by July 4, 2022
BVSTools >> BVSTools Announcements >> GreenTools for Microsoft Apps (G4MS) Specific Announcements
What Objects Should I Omit from Replication to Ensure My License Keys Work on my HA/DR System? What Objects Should I Omit from Replication to Ensure My License Keys Work on my HA/DR System?
Posted by June 27, 2022
BVSTools >> BVSTools Software Discussion

Reply




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