I'm trying to send emails automatically using process flowcharts in Advanced Pack 2.10.0.
Instead of being sent automatically, the email gets stuck in the user's draft email folder.
The following script is executed as a Script Task in the flowchart.
$emailId = record\create('Email',
'to', entity\attribute('emailAddress'),
'from', entity\attribute('userStaffAssign.emailAddress'),
'status', 'Sending',
'attachmentsIds', list($attachmentId),
'parentType', 'Lead',
'parentId', entity\attribute('id')
);
ext\email\applyTemplate($emailId, '616774f38a63217db');
ext\email\send($emailId);
The email template and the attachment both work properly. But the email is not sent unless the user goes to the draft email folder and manually sends it.
Can anyone see what I'm doing wrong?
Using Espo version 7.1.7 with Advanced Pack 2.10.0.
Instead of being sent automatically, the email gets stuck in the user's draft email folder.
The following script is executed as a Script Task in the flowchart.
$emailId = record\create('Email',
'to', entity\attribute('emailAddress'),
'from', entity\attribute('userStaffAssign.emailAddress'),
'status', 'Sending',
'attachmentsIds', list($attachmentId),
'parentType', 'Lead',
'parentId', entity\attribute('id')
);
ext\email\applyTemplate($emailId, '616774f38a63217db');
ext\email\send($emailId);
The email template and the attachment both work properly. But the email is not sent unless the user goes to the draft email folder and manually sends it.
Can anyone see what I'm doing wrong?
Using Espo version 7.1.7 with Advanced Pack 2.10.0.
Comment