frxMailExport + PDF Attach

edited December 2008 in FastReport 4.0
Hi, first of all sorry for my poor english.

Im trying to send a report like this example:

http://www.fast-report.com/en/forum/index....&#entry8856

this is part of my code

procedure TFborrador2.BitBtn4Click(Sender: TObject);
var
qborrador:TfrxADOQuery;
texto,fecha,nombre,dni,datos:TfrxMemoView;
begin
//Cargamos el formulario
iborrador.LoadFromFile('informes/iborrador.fr3');

...

//Lo mandamos por correo electr??nico
frxmailexport1.ShowDialog := False;
frxmailexport1.Address:='maildestino@gmail.com';
frxmailexport1.FromMail := 'loquesea@loquesea.com';
frxmailexport1.Subject := 'Ejemplo 1';
frxmailexport1.SmtpHost := 'smtp.loquesea.ext';
frxmailexport1.SmtpPort := 25;
frxmailexport1.Login := 'login@server.com';
frxmailexport1.Password := 'mipassworddelserver';
frxmailexport1.ExportFilter := frxpdfexport1;
iborrador.Export(frxmailexport1);
end;

It must work! but really the application crash sending this error:

First chance exception at $7C812AEB. Exception class EFCreateError with message 'Cannot create file "C:\DOCUME~1\*******\CONFIG~1\Temp\informes\iborrador.pdf". El sistema no puede hallar la ruta especificada'. Process Gapartados.exe (3712)

Any body knows how to solve this problem?

Thanks everybody !

Comments

  • mierlpmierlp Netherlands
    edited 5:04AM
    Hi,

    See my earlier topic : http://www.fast-report.com/en/forum/index....&hl=frxmail

    using frxMailExport isn''t a good solution for sending mail and the best way is to use create
    a pdf with frxPDFexport and send mail with the INDY components, than you can build
    a multi thread solution for sending mail. Othewise your programm is waiting till the
    mail is send and than you can use the program.

    Regards Peter

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.