Send Mail error
i use D11 (in designtime, components):
frMail: TfrxMailExport
frTonerAnnuale: TfrxReport
frPDF: TfrxPDFExport
the code:
frEmail.UseMAPI := MAPI;
frEmail.Address:='Recepient Name <' + Trim(uContatti.FieldByName('EMAIL').AsString) + '>';
frEmail.ExportFilter:=frPDF;
frEmail.FilterDesc:='PDF per E-Mail';
frEmail.FromMail:='Sender Name <m.......gmail.com>';
frEmail.Login := '';
frEmail.Password := '';
frEmail.Subject:='SERN: Bozza di contratto di servizio';
frEmail.Lines.Add('Buongiorno, ' + #13#10#13#10 + 'in allegato quanto in oggetto.');
frTonerAnnuale.Export(frEmail);
Error: MAPI access denied
I ask, kindly, if you can help me find a solution. Thank you
Comments
sorry, specific:
i have thunderbird as a mail client
sorry, is the above code ok to send a report in pdf format by email?
thanks
I enclose a small test program.
When I run it I get: MAPI access denied.
Usage: Win10, D11, FR 6 and thunderbird as a mail client.
The sender has a gmail address.
Please can someone tell me if the code is ok, because thunderbird is well configured and works great.
Best regards
Resolve:
the code is OK: i use SMTP not MAPI
thanks