Attaching a dynamically generated PDF to a mailing

Use this forum for questions regarding adoption and functionality of OpenEMM

Moderator: moderator

ss_convert
Posts: 1
Joined: Mon May 20, 2013 8:11 pm

Attaching a dynamically generated PDF to a mailing

Post by ss_convert »

I have an Action setup where I use OpenEMM's scripting language to dynamically send a mailing to a single registrant. I now have the need to dynamically generate a PDF and attach it (as an attachment) to the mailing. Here is my current script action that just sends the mailing:

Code: Select all

#set($mail = $MailingDao.getMailing(5, 1))

#if($mail)
  #set($recipStr = $requestParameters.RECIPIENT)
  #set($Integer = 0)
  #set($recipID = $Integer.parseInt($recipStr))
  $mail.sendEventMailing($recipID, 0, "1", null, $ScriptHelper.getApplicationContext())
#end

#set($scriptResult="1")
I can handle generating the PDF separately, but does anyone know how to attach a file using the scripting language? Thanks.

Matt