Send emails from Delphi using Amazon Simple Email Service (SES) v2. Select a verified sending identity, compose a message, and send it.
TSESV2Client.ListEmailIdentitiesto populate the sender dropdownTSESV2Client.SendEmailto send the messageTSESV2Optionsfor region-specific client configuration
LDestination := TSESV2Destination.Create;
LDestination.AddToAddress('recipient@example.com');
LMessage := TSESV2Message.Create('Subject line');
LMessage.Body.Text := TSESV2Content.Create('Meeting moved to 3pm.');
LRequest := TSESV2SendEmailRequest.Create;
LRequest.Destination := LDestination;
LRequest.FromEmailAddress := 'sender@example.com';
LRequest.Content.Simple := LMessage;
LResponse := Client.SendEmail(LRequest);
if LResponse.IsSuccessful then
// Email sent- Open "SendEmail.dproj" in Delphi or RAD Studio.
- Select "Run > Run" from the menu or press F9.
- Select a region in the "From Region" selector.
- Select an identity to send from using the "From Identity" selector.
- Enter a valid email address to receive the message in the "To" input.
- Enter a subject and write the message content.
- Click "Send" when ready to send the email.
ses:ListEmailIdentitiesses:SendEmail
