Sending email via Gmail using TppEmail
Hi,
I'm trying to send an email via Gmail using TppEmail directly and cannot get it to work. I receive a << raised exception class EIdHostRequired with message ". >> error when trying to send. I setup the Gmail email configuration and credentials the same way as I had done when sending email using TppReport.SendEmail. Do you have an example of sending email via Gmail using the TppEmail class directly that you could send me. Any assistance you can provide is greatly appreciated.
I'm trying to send an email via Gmail using TppEmail directly and cannot get it to work. I receive a << raised exception class EIdHostRequired with message ". >> error when trying to send. I setup the Gmail email configuration and credentials the same way as I had done when sending email using TppReport.SendEmail. Do you have an example of sending email via Gmail using the TppEmail class directly that you could send me. Any assistance you can provide is greatly appreciated.
Thanks,
Scott
Scott
Comments
The email feature consists of three main classes: TppEmail, TppEmailMessage, and TppSMTP... plugin(s).
The Email class exports the report, creates a message, and sends the message using the desired plugin. It is possible to perform the above manually without TppEmail however its purpose is to perform everything automatically.
For convenience every TppReport object has its own TppEmail class which is used to directly send.
---
So when you make a call to Report.SendMail, you are essentially using the TppEmail object behind the scenes.
If you are trying to create and use the TppEmail object as a stand-alone feature, you will need to be sure to manually add the report you want to send using the AddReport() routine. Otherwise the Email object has no information about your server etc. from the Email settings.
Example:
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Scott
Scott
The TppEmail class requires a report to send an email. If you would like to send and email without a report, you will need to manually create a TppEmailMessage object and TppSMTP class, assign the EmailMessage properties and TppSMTP properties, then call TppSMTP.SendMail.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Scott