Hi, I need to send mails to customers using Docentric.
In this email I don’t have to add attachments, but only add a table with the placeholders of the sales orders to the body.
To do this I used the example found in the article “Improved Email Templates – Creating Email Body with Dynamic Table”.
Up to here everything ok. Now my problem is that the email is sent immediately without the possibility of being modified in Preview mode. Is there a way to open it in Outlook before sending?
In order to be able to open the email in Outlook before sending, you only need to set Open email before sending flag to Yes. You can find this flag in Docentric Print destination settings > Email and below the Subject field as it can be seen from the screenshot:
thank for your quickly response. I am not using a Report to send email, just using an email template and send it to the customer using docentric method DocEmailTemplateManager::sendMail() like described in post “Improved Email Templates – Creating Email Body with Dynamic Table” (Improved Email Templates - Creating Email Body with Dynamic Table)
You can send your email using email processing, which will save the email in the batch email sending status form (table is SysOutgoingEmailTable). We have improved this form and one of the improvements is downloading the email message in eml format. In this link, you can find all our improvements to the batch email sending status form.
To send email using email processing, set the _useEmailProcessing input parameter of the DocEmailTemplateManager::sendMail() method to TRUE.
Below is the code example that we use to download email messages from the SysOutgoingEmailTable table.
First, we convert the email message to the EML using the MailHelper::ConvertMailMessageToEml(mailMsg) method whose return value is the MemoryStream object, and after that use the DocFileMngHelper::sendFileToUser() method that takes the memory stream, puts it into temporary storage and redirects the user to that file to be downloaded by the user’s browser.