You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature Request Description
Currently any new issue email sent to Eventum has the email respond to the From address and ignores the "ReplyTo" field when the email header is set.
Use case: We create emails from another system that sends from a no-reply address and sets the ReplyTo address to the user who initiated the issue. Alternatively a user sending from one account and specifying a replyto at another address.
I have tried to work around this through the workflow (see code sample below), but the method: Support::getEmailsByIssue($issue_id)
doesn't return the issue creating email in either the handleNewIssue or getAdditionalEmailAddresses workflow methods. The inline workflow documentation isn't clear that these are called before the issue is fully saved.
As a proof of concept the code below works standalone after the issue is created. I'm sure there are much better ways to do this during email ingestion.
require_once 'init.php';
$issue_id = 12345;
if (!empty($argv[1])) {
$issue_id = $argv[1];
}
//
// Subscribe emails with Reply-To set on email.
//
// get Email message(s)
$supportEmails = Support::getEmailsByIssue($issue_id);
if(!empty($supportEmails)) {
$email = $supportEmails[0];
$sup_id = $email['sup_id'];
if($email['sup_from'] == 'no-reply@abc.com'
|| $email['sup_from'] == 'no-reply@def.com') {
$mail = Support::getSupportEmail($sup_id); // ret MailMessage
$replyTo = $mail->getHeaderByName('Reply-To')->getFieldValue(); // ret "Xyz" <email@x.y>
if(!empty($replyTo)) {
$usr_id = User::getUserIDByEmail('ADMIN EMAIL ADDRESS');
Notification::subscribeEmail(
$usr_id, $issue_id, $replyTo,
['closed', 'emails']);
// return array($replyTo); // if used in getAdditionalEmailAddresses
// send special 'an issue was auto-created for you' notification back to the sender
$date = Date_Helper::getRFC822Date($mail->date);
$subject = "";
$prj_id = 3; // Valid project ID if not in workflow
Notification::notifyAutoCreatedIssue($prj_id, $issue_id, $replyTo, $date, $subject);
}
}
}
I don't think this has come up before so it possibly isn't that common. Any suggestions how to work around in workflow (if possible) would be appreciated.
The text was updated successfully, but these errors were encountered:
Feature Request Description
Currently any new issue email sent to Eventum has the email respond to the From address and ignores the "ReplyTo" field when the email header is set.
Use case: We create emails from another system that sends from a no-reply address and sets the ReplyTo address to the user who initiated the issue. Alternatively a user sending from one account and specifying a replyto at another address.
I have tried to work around this through the workflow (see code sample below), but the method:
Support::getEmailsByIssue($issue_id)
doesn't return the issue creating email in either the
handleNewIssue
orgetAdditionalEmailAddresses
workflow methods. The inline workflow documentation isn't clear that these are called before the issue is fully saved.As a proof of concept the code below works standalone after the issue is created. I'm sure there are much better ways to do this during email ingestion.
I don't think this has come up before so it possibly isn't that common. Any suggestions how to work around in workflow (if possible) would be appreciated.
The text was updated successfully, but these errors were encountered: