[Vtigercrm-developers] Workflow Task from email issue

anup anup.my001 at gmail.com
Thu Apr 10 08:30:59 GMT 2014


Hello Team,

In workflow email tasks if we enter the email address into from email field
the tasks are not getting queued
but if you select it from the picklist on right hand side the mails are
getting in queue in com_vtiger_workflowtask_queue and mails are being sent.

Reason :

The event handler after save check for workflow event handler and in file
modules/com_vtiger_workflow/VTWorkflowManager.inc

performTasks() function executes and in line 324 $hasContents =
$task->hasContents($entityData); check for contents

Next in File - modules/com_vtiger_workflow/tasks/VTEmailTask.inc, Line no
119

Actuall code

$fromEmailDetails = $et->render($entityCache, $entityId);
list($fromName, $fromEmail) = explode('<', $fromEmailDetails);
list($fromEmail, $rest) = explode('>', $fromEmail);

But if we enter manually email address

in $fromEmailDetails there will be only email id, there wont be $fromName ,
< and >.

in the next line when you explode the email id moves to $fromName and
$fromEmail will be null.

Finally in line 136 there is a condition to check $fromEmail is empty and
this returns false and the queuing does not occur.

I have applied a small fix for temporary, Hope you will check and apply the
right fix.


Thanks
Anup.M.Y
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20140410/f4af539b/attachment.html>


More information about the vtigercrm-developers mailing list