Skip to content

Commit

Permalink
Fixed issue #5474: Not possible to send a token to multiple email add…
Browse files Browse the repository at this point in the history
…resses

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@11225 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
c-schmitz committed Oct 20, 2011
1 parent 0d2a37e commit 38c0fa5
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions admin/tokens.php
Original file line number Diff line number Diff line change
Expand Up @@ -1557,7 +1557,11 @@
while ($emrow = $emresult->FetchRow())
{
unset($fieldsarray);
$to = $emrow['firstname']." ".$emrow['lastname']." <".$emrow['email'].">";
$aEmailaddresses=explode(';',$emrow['email']);
foreach($aEmailaddresses as $sEmailaddress)
{
$to[]=$emrow['firstname']." ".$emrow['lastname']." <{$sEmailaddress}>";
}
$fieldsarray["{EMAIL}"]=$emrow['email'];
$fieldsarray["{FIRSTNAME}"]=$emrow['firstname'];
$fieldsarray["{LASTNAME}"]=$emrow['lastname'];
Expand Down Expand Up @@ -1628,7 +1632,7 @@
."SET sent='$today' WHERE tid={$emrow['tid']}";
//
$uderesult = $connect->Execute($udequery) or safe_die ("Could not update tokens<br />$udequery<br />".$connect->ErrorMsg());
$tokenoutput .= $clang->gT("Invitation sent to:")." {$emrow['firstname']} {$emrow['lastname']} ($to)<br />\n";
$tokenoutput .= $clang->gT("Invitation sent to:")." {$emrow['firstname']} {$emrow['lastname']} (".htmlspecialchars(implode(',',$to)).")<br />\n";
if ($emailsmtpdebug==2)
{
$tokenoutput .=$maildebug;
Expand Down Expand Up @@ -1885,7 +1889,11 @@
while ($emrow = $emresult->FetchRow())
{
unset($fieldsarray);
$to = $emrow['firstname']." ".$emrow['lastname']." <".$emrow['email'].">";
$aEmailaddresses=explode(';',$emrow['email']);
foreach($aEmailaddresses as $sEmailaddress)
{
$to[]=$emrow['firstname']." ".$emrow['lastname']." <{$sEmailaddress}>";
}
$fieldsarray["{EMAIL}"]=$emrow['email'];
$fieldsarray["{FIRSTNAME}"]=$emrow['firstname'];
$fieldsarray["{LASTNAME}"]=$emrow['lastname'];
Expand Down

0 comments on commit 38c0fa5

Please sign in to comment.