Skip to content

TTMSFNCCloudMailChimpMarketing

Usage

A component that provides access to the SendGrid API. It allows the user to send E-mails to other people.

Authorization information

API Key

Template

To send a SendGrid email you'll have to configure the template. This template contains several properties which are needed.

Methods

Method name Description
SendMail Sends the mail with the predefined template
  TMSFNCCloudSendGrid1.APIKey := APIKeyEdit.Text;
  TMSFNCCloudSendGrid1.Template.From.Email := FromEdit.Text;
  p := TTMSFNCCloudSendGridRecipient.Create;
  p.Email := ToEdit.Text;
  TMSFNCCloudSendGrid1.Template.RecipientsList.Clear;
  TMSFNCCloudSendGrid1.Template.RecipientsList.Add(p);
  TMSFNCCloudSendGrid1.Template.Subject := SubjectButton.Text;
  TMSFNCCloudSendGrid1.Template.Content.clear;
  c:= TTMSFNCCloudSendGridContent.Create;
  c.ContentType := 'text/html';
  c.Value := BodyMemo.Text;
  TMSFNCCloudSendGrid1.Template.Content.Add(c);

  TMSFNCCloudSendGrid1.SendMail;

Events

Event name Description
OnSendSuccess Event fired when the mail has been successfully sent to the recipients
OnError Event Fired when an error occurred while sending the email