Internal: you can add 'attachments' => array of ormDocument to the context of a trigger, the attachments will be added to the email sent

SVN:trunk[2291]
This commit is contained in:
Romain Quetiez
2012-10-18 17:15:06 +00:00
parent 53aefa895b
commit fa8cbd08d4

View File

@@ -356,6 +356,14 @@ class ActionEmail extends ActionNotification
$oEmail->SetMessageId($sMessageId);
}
if (isset($aContextArgs['attachments']))
{
foreach($aContextArgs['attachments'] as $oDocument)
{
$oEmail->AddAttachment($oDocument->GetData(), $oDocument->GetFileName(), $oDocument->GetMimeType());
}
}
if (empty($this->m_aMailErrors))
{
if ($this->m_iRecipients == 0)