Using INDY to send emails
Hi,
I am using RB 11.08 and Delphi 6 and am trying to configure my reports
to use either MAPI or SMTP (via Indy components) depending on the users
preferences. I have read through the manual, looked at your
EmailEmampleProj and scanned the newsgroup but am still unlcear about a
few points:
1. In the manual it says to include ppSMTPIndy in my uses clause, but I
also have to add ppSMTPCustom to get the TppSMTPPlugIn.RegisterClass
line to compile. Is this correct or am I doing something else wrong?
2. Once I have called TppSMTPPlugIn.RegisterClass(TppSMTPIndy), are ALL
the reports in my application from that point onwards emailed either by
calling SendMail or by the user choosing the email button in the preview
dialog sent via SMTP, or do I have to call RegisterClass for each
report?
3. If I set the UserId, Password, Host etc in a/the? TIdSMTP component
are these picked up by ReportBuilder or do I have to set them
individually for each report (ie is there any use for the TidSMTP
component in relation to ReportBuilder)?
Thanks for any help
Steve Everington
I am using RB 11.08 and Delphi 6 and am trying to configure my reports
to use either MAPI or SMTP (via Indy components) depending on the users
preferences. I have read through the manual, looked at your
EmailEmampleProj and scanned the newsgroup but am still unlcear about a
few points:
1. In the manual it says to include ppSMTPIndy in my uses clause, but I
also have to add ppSMTPCustom to get the TppSMTPPlugIn.RegisterClass
line to compile. Is this correct or am I doing something else wrong?
2. Once I have called TppSMTPPlugIn.RegisterClass(TppSMTPIndy), are ALL
the reports in my application from that point onwards emailed either by
calling SendMail or by the user choosing the email button in the preview
dialog sent via SMTP, or do I have to call RegisterClass for each
report?
3. If I set the UserId, Password, Host etc in a/the? TIdSMTP component
are these picked up by ReportBuilder or do I have to set them
individually for each report (ie is there any use for the TidSMTP
component in relation to ReportBuilder)?
Thanks for any help
Steve Everington
This discussion has been closed.
Comments
1. Yes, you need to have ppSMTPCustom in your uses clause to use the
RegisterClass routines.
2. Yes, once you register a plugin, that plugin will be used to send all
emails until another is registered.
3. ReportBuilder creates its own TidSMTP component to send emails, there
is no need to create your own. Use the TppReport.EmailSettings to
define the HostAddress, UserID, Password, etc. It is also possible to
access and manipulate the internal TidSMTP object using the method below...
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