Skip to content

Commit

Permalink
Dev: Fixed issue : SMTP debug don't show email and a lot of other thi…
Browse files Browse the repository at this point in the history
…ngs.

Dev: strip_tags remove the <user@example.org> part
Dev: p didn't accept pre inside
  • Loading branch information
Shnoulle committed Jun 14, 2017
1 parent b370399 commit 6cafd75
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion application/controllers/admin/tokens.php
Expand Up @@ -1509,7 +1509,7 @@ public function email($iSurveyId, $tokenids = null)
}
}
$tokenoutput .= htmlspecialchars(ReplaceFields("{$emrow['tid']}: {FIRSTNAME} {LASTNAME} ({EMAIL})", $fieldsarray)). "<br />\n";
if (Yii::app()->getConfig("emailsmtpdebug") == 2)
if (Yii::app()->getConfig("emailsmtpdebug") > 1)
{
$tokenoutput .= $maildebug;
}
Expand Down
2 changes: 1 addition & 1 deletion application/helpers/common_helper.php
Expand Up @@ -2821,7 +2821,7 @@ function SendEmailMessage($body, $subject, $to, $from, $sitename, $ishtml=false,
$sent=$mail->Send();
$maildebug=$mail->ErrorInfo;
if ($emailsmtpdebug>0) {
$maildebug .= '<li>'. gT('SMTP debug output:').'</li><pre>'.strip_tags(ob_get_contents()).'</pre>';
$maildebug .= '<strong>'. gT('SMTP debug output:').'</strong><pre>'.\CHtml::encode(ob_get_contents()).'</pre>';
ob_end_clean();
}
$maildebugbody=$mail->Body;
Expand Down
4 changes: 2 additions & 2 deletions application/views/admin/token/emailpost.php
Expand Up @@ -10,9 +10,9 @@
<div class="col-sm-11 col-sm-offset-1 content-right">
<div class="jumbotron message-box">
<h2 ><?php if ($bEmail) eT("Sending invitations..."); else eT("Sending reminders...");?></h2>
<p style='border: 1px solid #ccc; height: 200px; overflow: scroll; text-align:left; padding-left:0.5em;'>
<div style='border: 1px solid #ccc; max-height: 80em; overflow: scroll; text-align:left; padding-left:0.5em;'>
<?php echo $tokenoutput ?>
</p>
</div>
</div>
</div>
</div>
Expand Down

0 comments on commit 6cafd75

Please sign in to comment.