Access to IdMessage in TppReport when sending mails
Hello,
I use successfully TppReport's SendMail to send emails.
But I need to change charset of a message body.
And there I couldn't find any way to get access to the message part of
the report. The question is in the code below.
uses ppSMTPIndy10;
var lEmail: TppEmail;
lIdMessage: TIdMessage;
with Rep do begin
TppEmail(Email).SMTP.OnEmailError := EmailErrorEvent;
TppEmail(Email).SMTP.OnStatusChange := EmailStatusChangeEvent;
TppSMTPPlugIn.RegisterClass(TppSMTPIndy);
EmailSettings.Recipients.Clear;
EmailSettings.Recipients.Add('somemail@mail.com');
EmailSettings.Body.Text:= 'Body text';
lEmail := TppEmail(Email);
TppSMTPIndy(lEmail.SMTP).IndySMTP.AuthType:= satNone;
// lIdMessage:= - what should be here ?
// lIdMessage.CharSet:= 'Windows-1251';
SendMail;
end;
Thanks in advance,
Nicos
I use successfully TppReport's SendMail to send emails.
But I need to change charset of a message body.
And there I couldn't find any way to get access to the message part of
the report. The question is in the code below.
uses ppSMTPIndy10;
var lEmail: TppEmail;
lIdMessage: TIdMessage;
with Rep do begin
TppEmail(Email).SMTP.OnEmailError := EmailErrorEvent;
TppEmail(Email).SMTP.OnStatusChange := EmailStatusChangeEvent;
TppSMTPPlugIn.RegisterClass(TppSMTPIndy);
EmailSettings.Recipients.Clear;
EmailSettings.Recipients.Add('somemail@mail.com');
EmailSettings.Body.Text:= 'Body text';
lEmail := TppEmail(Email);
TppSMTPIndy(lEmail.SMTP).IndySMTP.AuthType:= satNone;
// lIdMessage:= - what should be here ?
// lIdMessage.CharSet:= 'Windows-1251';
SendMail;
end;
Thanks in advance,
Nicos
This discussion has been closed.
Comments
You can access the TIdMessage object using the IndyMessage property.
lIdMessage := TppSMTPIndy(lEmail.SMTP).IndyMessage;
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Unfortunatelly I can't find this property - IndyMessage
There is only IndySMTP
I use Delphi 2010, RB 11.07 and ppSMTPIndy10 in uses list
Regards,
Nicos
On Mon, 27 Jan 2014 08:41:38 -0700, "Nico Cizik (Digital Metaphors)"
This property was added for a later version of ReportBuilder. Moving
forward we hope you will consider upgrading to the latest version to
take advantage of this and many other new features.
http://www.digital-metaphors.com/rbWiki/General/What's_New
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Unfortunatelly it's not possible for now.
Maybe in future.
In any case thanks for the replies
Regards,
Nicos
On Tue, 28 Jan 2014 09:18:20 -0700, "Nico Cizik (Digital Metaphors)"