Documentation on TfrxMailExport

edited 12:22AM in FastReport 3.0
Is there documentatiion on how to use the TfrxMailExport component?

Comments

  • edited 12:22AM
    For Example (Mail with PDF-Attachment):
    procedure TForm1.Mailexport(Sender: TObject);
    var strm:tmemorystream;
    begin
         strm:=tmemorystream.Create;
         tblRechnungenRGDaten.SaveToStream(strm); // loading report from table (blob-field) into stream
         strm.Position:=0;
         frxreport1.PreviewPages.LoadFromStream(strm); // loading report from stream into frxreport 
         frxreport1.ReportOptions.Name:=' any text';
         frxreport1.FileName:='Filename';
         strm.Free;
         frxMailExport1.Address:='abcdefg@earth.xyz';
         frxMailExport1.ExportFilter:=frxPDFExport1; // or other
         frxMailExport1.FilterDesc:='PDF per E-Mail versenden';
         frxMailExport1.FromMail:='your-email@your-domain.com';
         frxMailExport1.FromCompany:='Your company';
         frxMailExport1.FromName:='Your Name';
         frxMailExport1.Login:='125537733'; //Login for smtp-server
         frxMailExport1.Password:='*******'; //Password for smtp-server
         frxMailExport1.SmtpHost:='smtp.earth.xyz';
         frxMailexport1.Subject:='Subject-Text here';
         frxMailexport1.Lines.Add('Hi there, '+#13#10#13#10+'heres comes an email with attached PDF);
         frxpdfexport1.Author:='Name of Author';
         frxpdfexport1.Subject:='Any text for PDF-Subject';
         frxpdfexport1.Creator:=application.Title;
         frxreport1.Export(frxMailExport1);
    end;
    


    I hope it's free from errors an may it will help you ...

    Regards
    Ralf

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.