procedure TForm1.btnSendClick(Sender: TObject); begin //composing a new message clMailMessage1.BuildMessage('The message text', ['filename.ext']); clMailMessage1.Subject := 'Subject line follows here'; clMailMessage1.From.FullAddress := 'sender@domain.com'; clMailMessage1.ToList.Clear(); clMailMessage1.ToList.Add('recipient@another.com'); //sending the message end;
procedure TForm1.clMailMessage1LoadAttachment(Sender: TObject; ABody: TclAttachmentBody; var AFileName: string; var AData: TStream; var Handled: Boolean); begin if (AFileName = 'filename.ext') then begin //loading the attachment content from a database AData := TMemoryStream.Create(); BlobField1.SaveToStream(AData); AData.Position := 0; Handled := True; end; end;
Trouble logging in? Simply enter your email address OR username in order to reset your password.
For faster and more reliable delivery, add admin@clevercomponents.com to your trusted senders list in your email software.