Email pdf report
Henrik Lyder
Chaska, Minnesota USA
I would like to programatically create and send a pdf as an email attachment.
I have placed components TfrxReport, TfrxMailExport and TfrxPFDExport on a form in delphi 2010 using FastReport 4.10.18
using the code
frxReport1.LoadFromFile('nameofreport.fr3')
frxReport1.preparereport;
frxMail.Subject := 'test attachment ';
frxMail.FromName := 'my name';
frxMail.FromMail := 'myddress@mydomain.com';
frxMail.Address := 'receiver@mydomain.com';
frxMail.FromCompany := 'my company';
frxMail.Login := 'myaddress@mydomain.com';
frxMail.Password := 'password';
frxMail.SmtpHost := 'smtp.mydomain.com';
frxMail.SmtpPort := 587;
frxMail.useIniFile := false;
frxMail.ExportFilter := frxPDFExport;
frxMail.ShowDialog := false;
frxReport1.Export(frmMail);
This approach works but I am unable to set multiple receipients (seperate by ; )
Regards
Henrik Lyder
I have placed components TfrxReport, TfrxMailExport and TfrxPFDExport on a form in delphi 2010 using FastReport 4.10.18
using the code
frxReport1.LoadFromFile('nameofreport.fr3')
frxReport1.preparereport;
frxMail.Subject := 'test attachment ';
frxMail.FromName := 'my name';
frxMail.FromMail := 'myddress@mydomain.com';
frxMail.Address := 'receiver@mydomain.com';
frxMail.FromCompany := 'my company';
frxMail.Login := 'myaddress@mydomain.com';
frxMail.Password := 'password';
frxMail.SmtpHost := 'smtp.mydomain.com';
frxMail.SmtpPort := 587;
frxMail.useIniFile := false;
frxMail.ExportFilter := frxPDFExport;
frxMail.ShowDialog := false;
frxReport1.Export(frmMail);
This approach works but I am unable to set multiple receipients (seperate by ; )
Regards
Henrik Lyder
Comments