Skip to content

JosepPages7/Delphi-GEmail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Delphi-GEmail

Delphi class to send an email using gmail.

Use sample:

  Gmail := TcfsGmail.Create('YourAccount@gmail.com', 'App password', 'From you/company');
  try
    try
      Gmail.Connect;
      Gmail.Send(['useremail@gmail.com'], 'Subject', 'PlainBody', 'htmlBody', 'AttachmentFile');
      //Gmail.Send(...);
      //Gmail.Send(...);
    except
      on E: Exception do
        ShowMessage(E.Message);
    end;
  finally
    GEmail.Free;
  end;
  

NOTE 1: Add in your executable file path the two openSSL Libraries: "libeay32.dll" and "ssleay32.dll".

NOTE 2: Configure your email "YourAccount@gmail.com" account to allow sending mails from and external app: Enter in your Personnal Setting (gmail) go to "Security": Activate “2-Step Verification” and add “App Password” or Activate "Allow less secure apps "

More info: http://delphiprogrammingdiary.blogspot.com/2016/09/send-email-with-html-body-format-in.html http://www.andrecelestino.com/delphi-xe-envio-de-e-mail-com-componentes-indy/

About

Delphi class to send an email using gmail

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages