Sample Application Sending a gmail with:
Multiple Address
HTML Body
Attach File
Many thanks to Abaksoft! for his detailed post and sample.
// Use sample:
Gmail := TGmail.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;
Atthached file:
Sending_gmail.7z