Skip to content

Commit

Permalink
Some fixes for SendEmailMessage.
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_ci@10734 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
dionet committed Aug 15, 2011
1 parent e597d04 commit 9612da1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion application/controllers/admin/tokens.php
Expand Up @@ -653,6 +653,7 @@ function updatetokenattributedescriptions($surveyid)
*/
function email($surveyid,$tokenids=null)
{
global $maildebug, $maildebugbody;
$clang=$this->limesurvey_lang;
if(!bHasSurveyPermission($surveyid, 'tokens', 'update'))
{
Expand Down Expand Up @@ -830,7 +831,7 @@ function email($surveyid,$tokenids=null)
}
else
{
$tokenoutput .= '<li>'.ReplaceFields($clang->gT("Email to {FIRSTNAME} {LASTNAME} ({EMAIL}) failed. Error Message:")." "./*$maildebug.*/"<br />", $fieldsarray).'</li>';
$tokenoutput .= '<li>'.ReplaceFields($clang->gT("Email to {FIRSTNAME} {LASTNAME} ({EMAIL}) failed. Error Message:")." ".$maildebug."<br />", $fieldsarray).'</li>';
/*if ($debug>0)
{
$tokenoutput .= "<pre>Subject : $modsubject<br /><br />".htmlspecialchars($maildebugbody)."</pre>";
Expand Down
6 changes: 3 additions & 3 deletions application/helpers/common_helper.php
Expand Up @@ -5319,11 +5319,11 @@ function SendEmailMessage($body, $subject, $to, $from, $sitename, $ishtml=false,
}


require_once(APPDATA.'/third_party/phpmailer/class.phpmailer.php');
require_once(APPPATH.'/third_party/phpmailer/class.phpmailer.php');
$mail = new PHPMailer;
if (!$mail->SetLanguage($defaultlang,APPDATA.'/third_party/phpmailer/language/'))
if (!$mail->SetLanguage($defaultlang,APPPATH.'/third_party/phpmailer/language/'))
{
$mail->SetLanguage('en',APPDATA.'/third_party/phpmailer/language/');
$mail->SetLanguage('en',APPPATH.'/third_party/phpmailer/language/');
}
$mail->CharSet = $emailcharset;
if (isset($emailsmtpssl) && trim($emailsmtpssl)!=='' && $emailsmtpssl!==0) {
Expand Down

0 comments on commit 9612da1

Please sign in to comment.