SMTP

  • 08 May

    Sending emails using GMail SMTP with OAuth2 authentication – OOB

    Q: Sending emails using GMail SMTP with OAuth2 authentication. I am trying to set up an outgoing email notification that will happen when a file moves to it’s destination.

    8th of May 2022, we are working on an update because of: OAuth out-of-band (oob) flow will be deprecated

    Instead of the Google URI urn:ietf:wg:oauth:2.0:oob you’ll have to use a loopback (IP) address as Redirect URI like http://127.0.0.1 or http://localhost

    Starting from version v2022.5.8.0 a redirect port will be added to the OAuth2 setup which is only needed during the OAuth2 verification setup.

     

    A: Yes this is possible.

    First check if you enabled the GMail API in your account: https://support.google.com/googleapi/answer/6158841?hl=en

    Secondly we’ll need credentials ‘Client ID and Client Secret’  for the OAuth2 authentication: https://support.google.com/googleapi/answer/6158857?hl=en&ref_topic=7013279

    We added some screenshots to help you with the setup.

    Limagito File Mover SMTP Setup

    Don’t forget the Security Options:

    Limagito File Mover SMTP Setup

    OAuth2 Setup:

    OAuth out-of-band (oob) flow will be deprecated
    Please add the following information:
    – Authorization Endpoint URL: https://accounts.google.com/o/oauth2/v2/auth
    – Token Endpoint URL: https://www.googleapis.com/oauth2/v4/token
    – Client ID
    – Client Secret
    – Scope: https://mail.google.com/
    – Redirect URI: http://127.0.0.1
    – Redirect Port: 3017 (can be any other port that is not in use)
    Click GET and your browser will open. Please follow the steps in your browser and after acceptance we will automatically fill in Refresh Token and Access Token. Do not forget to <Save> afterwards.

    Limagito File Mobver GMail SMTP with OAuth2

    RunTime Log Result when testing:

    8/05/2022 17:54:07 OAuth2 Authorization Successful
    8/05/2022 17:54:09 Send Success C:\Test\In\IntroXFM.pdf to smtp.gmail.com;1356113
    8/05/2022 17:54:09 ************************************************************
    8/05/2022 17:54:09 Rule Start Time: 8/05/2022 17:54:07
    8/05/2022 17:54:09 Rule End Time: 8/05/2022 17:54:09
    8/05/2022 17:54:09 Total Files Successful, Count: 1 & Size: 1356113
    8/05/2022 17:54:09 ************************************************************

    #FileTransfer

    If you need any info about this ‘GMail SMTP with OAuth2’ question, please let us know.

    Best regards,

    Limagito Team

    By Limagito-Team Google OAuth2 SMTP , , ,
  • 25 Mar

    Email When Transfer Size is not Above 90GBs

    Q: Email When Transfer Size is not Above 90GBs. I have a job that runs everyday and 91GBs is transferred. On some days the job only transfers 60GBs because a file is locked. Is there a way to send an email when Limagito transfers anything under 90Gbs?
    A: Yes this is possible since version v2022.3.25.0. In this option we added some Integer (Int64) Var: psVIA (= Pascal Script Var Integer A).

    You’ll need to add some Pascal Script and Rule Event options to your existing transfer rule.

    1. Open our ‘Pascal Script’ option:

    Limagito File Mover Pascal Script option

    2. Enable and add the following ‘On Rule Begin’ Pascal Script (this script will set the integer psVIA Var to zero):

    Begin
      // ... add your code here
      psExitCode := 1;
      psVIA := 0;
    End.

    Limagito File Mover Email When Transfer Size Pascal Script

    3. Enable and add the following ‘On Rule End’ Pascal Script (this script will return an error internally when the total transfered size is not ok):

    Const
      ctMaxSize = 97710505984; // 90 GByte
    Begin
      psExitCode := 1;
      // Debug
      psLogWrite(1, '', 'End Size: ' + '%VIA');
      // Check
      If psVIA <= ctMaxSize Then
      Begin
        psLogWrite(1, '', 'End Size not above 90GBs');
        psExitCode := 0;
      End;
    End.

    Limagito File Mover Email When Transfer Size Pascal Script

    4. In the Function setup set ‘Destination Options’ to ‘Destination Memory & Exit Cyclus on Error’:

    Limagito File Mover Function Setup

    5. Add a Pascal Script as Destination. If you have multiple Destinations then our Pascal Script must be the last one in the list.

    Limagito File Mover Destinations

    6. Add the following Pascal Script as Destination (this will add the transfered filesize to the psVIA Integer Var):

    Begin
      // ... add your code here
      psExitCode:= 1;
      psVIA := psVIA + psFileSize;
      // Debug
      psLogWrite(1, '', 'Sum of Bytes: ' + Int64ToStr(psVIA));
    End.

    Limagito File Mover As Destination

    7. Open our ‘Rule Events’ option:

    Limagito File Mover Rule Events

    8. Select and enable ‘On Pascal Script Error’ event. With this event selected enable ‘Enable Mail’ and setup the Email and SMTP Setup.

    Limagito File Mover On Pascal Script Error Event

    Limagito File Mover Email Setup

    9. Received email in case 90GBs were not transfered:

    Limagito File Mover Email When Transfer Size email

    10. RunTime log will also show yout when transfered size was not reached:

    Limagito File Mover Email When Transfer Size RunTime Log

     

    #Filetransfer

    If you need any info about this ‘Email When Transfer Size’ request, please let us know.

    Best regards,

    Limagito Team

  • 09 Jan

    Handle multiple items like email addresses and source folders

    On request we added an option to handle multiple items like email addresses and source folders (version v2022.1.9.0).

    Double click on ‘To’, ‘Cc’ or ‘Bcc’ email addresses to open the new multiple items setup option:

    Limagito File Mover multiple email addresses

    Also available for the WIN as Source setup. Double click on the ‘select Directory’ edit field:

    Limagito File Mover multiple source folders

    If you need any info about the ‘handle multiple items’ option, please let us know.

    Best regards,

    Limagito Team

    By Limagito-Team SMTP WIN , ,
1 2 3 4 5 6
SEARCH