Problem with TppSMTPPlugIn
This is the first time I've tried email with Indy . I need to send a series
of emails without user intervention if a warning message appears.
I am using ReportBuilder 12.01
I placed ppSMTPIndy10 in the Uses clause
When I compile, I get an error on the statement...
TppSMTPPlugIn.RegisterClass(TppSMTPIndy);
The error says "Undeclared identifier - TppSMTPPlugIn
What am I doing wrong ?
Thanks
Whit
of emails without user intervention if a warning message appears.
I am using ReportBuilder 12.01
I placed ppSMTPIndy10 in the Uses clause
When I compile, I get an error on the statement...
TppSMTPPlugIn.RegisterClass(TppSMTPIndy);
The error says "Undeclared identifier - TppSMTPPlugIn
What am I doing wrong ?
Thanks
Whit
This discussion has been closed.
Comments
The TppSMTPPlugin class is in the ppSMTPCustom.pas file. Adding that to
your uses clause should solve the problem.
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I added ppSMTPCustom,ppSMTPIndy10 to the Uses clause and I no longer get
an error on the statement TppSMTPPlugIn.RegisterClass(TppSMTPIndy);
But, when I have those two units listed in Uses and have the TppSMTPPLugIN
statement in the code below, no EMail is generated when I execute the code.
If I comment out the tppSMTPPlugIn statement below but leave the two units
in the Uses clause, I still don't get an email when the code is executed.
If I comment out the tppSMTPPlugIn Statement, and comment out the two units
in the uses clause, the following code does send an email, but I get a
warning message, I think from my anti-virus software, saying that a program
is trying to send an email and do I want to deny or allow. I was trying to
skirt that warning message by using Indy to send the email. When I send an
email directly from within Outlook, I do not get that warning message.
Am I still doing something wrong?
Thanks
Whit
procedure TfMainForm.Button2Click(Sender: TObject);
begin
TppSMTPPlugIn.RegisterClass(TppSMTPIndy);
ppReport1.Emailsettings.previewinemailclient := false; //Gets rid of
Outlook form showing
ppreport1.EmailSettings.Recipients.Text := 'whit1950@ameritech.net';
ppreport1.EmailSettings.Subject := 'Audit Trail from ' +
dm1.tblSysMasCompanyName.AsString;
ppreport1.emailsettings.body.text := 'User License: ' +
dm1.tblSysMasProductLicense.asstring + chr(13) +
'Product Version: ' +
dm1.tblSysMasProductVersion.AsString + chr(13) +
'Run By: ' +
GetMyNetUserName + chr(13) +
'Run At: ' +
datetostr(Now)+ ' ' + timetostr(Now);
ppreport1.EmailSettings.showemaildialog := false; //get rid of ReportB
uilder Email form showing
ppreport1.SendMail;
end;
1. When you take the ppSMTPIndy10 unit out of the uses clause, you are
using the default email plugin (MAPI). This plugin sends email through
your installed email client (outlook). When you try to send an email
silently using MAPI you get the Microsoft solution to spamming
applications (allow/deny screen).
2. Indy allows you to connect directly to your mail server and send
silently. You are required however to define more properties such as
the mail server address, username, password, etc.
I suggest spending some time with the Email and Indy help docs as well
as the following articles to get better acquainted with the feature.
http://www.digital-metaphors.com/rbWiki/Output/Email/Email_Fundementals
http://www.digital-metaphors.com/rbWiki/Output/Email/How_To...Customize_Indy_Email_Settings
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com