PdcReport.Sendmail
Jump to navigation
Jump to search
Declaration
SendMail(Recipient as String,Subject as String,ShowInEmailClient as Boolean) as Boolean
Description
Notes
This method generates an E-mail with a pdf of the printpreview. The filename of the pdf is the report name in PdC (with.pdf). The subject of the mail stored in the report is only overwritten by the applied subject to the sendmail command. If the applied subject is empty, the subject of PdC is used in the E-mail. The mail body is stored in the report in PdC. To send the E-mail immediately, the third parameter must be false. When it is true, the E-mail is displayed.
Code example
This example code opens a report with ID 336 and create a pdf in an E-mail. After generating the E-mail, it is displayed.
dim objReport
dim strRecipient
dim strSubject
strRecipient = "[email protected];[email protected]" 'The adresses doesn't work
strSubject = "Report ID is 336: Mail with PDF"
set objReport = pdc.Reports.Open(336)
objReport.SendMail strRecipient, strSubject, True
Availability
Available since Februar 2011 (from version 4.2).