Skip to content

Commit

Permalink
Fixed issue #12187: invitation mails are not being sent using json-rpc
Browse files Browse the repository at this point in the history
  • Loading branch information
brammeleman authored and Shnoulle committed Apr 2, 2017
1 parent 194e44f commit f2cfa08
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions application/helpers/admin/token_helper.php
Expand Up @@ -133,15 +133,18 @@ function emailTokens($iSurveyID,$aResultTokens,$sType)
default:
throw new Exception('Invalid template name');
}


$modsubject = $sSubject;
$modmessage = $sMessage;

if (isset($barebone_link))
{
$modsubject = str_replace("@@SURVEYURL@@", $barebone_link, $sSubject);
$modmessage = str_replace("@@SURVEYURL@@", $barebone_link, $sMessage);
$modsubject = str_replace("@@SURVEYURL@@", $barebone_link, $modsubject);
$modmessage = str_replace("@@SURVEYURL@@", $barebone_link, $modmessage);
}

$modsubject = Replacefields($modsubject, $fieldsarray);
$modmessage = Replacefields($modmessage, $fieldsarray);
$modsubject = ReplaceFields($modsubject, $fieldsarray);
$modmessage = ReplaceFields($modmessage, $fieldsarray);

if (isset($aTokenRow['validfrom']) && trim($aTokenRow['validfrom']) != '' && convertDateTimeFormat($aTokenRow['validfrom'], 'Y-m-d H:i:s', 'U') * 1 > date('U') * 1)
{
Expand Down

0 comments on commit f2cfa08

Please sign in to comment.