Skip to content

Commit

Permalink
Modified "from" field in emails to present nice from (name and email)
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/trunk/unstable@296 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
jcleeland committed May 22, 2003
1 parent 7c5f953 commit cc6158e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions admin/tokens.php
Expand Up @@ -339,11 +339,11 @@
echo "</b></td></tr>\n";
echo "\t<tr>\n";
echo "\t\t<td align='right'>$setfont<b>From:</b></td>\n";
echo "\t\t<td><input type='text' $slstyle size='50' name='from' value='$surveyadminemail' /></td>\n";
echo "\t\t<td><input type='text' $slstyle size='50' name='from' value='$surveyadmin <$surveyadminemail>' /></td>\n";
echo "\t</tr>\n";
echo "\t<tr>\n";
echo "\t\t<td align='right'>$setfont<b>Subject:</b></td>\n";
echo "\t\t<td><input type='text' $slstyle size='50' name='subject' value='Invitation to participate in $surveyname survey' /></td>\n";
echo "\t\t<td><input type='text' $slstyle size='50' name='subject' value='Invitation to participate in $surveyname' /></td>\n";
echo "\t</tr>\n";
echo "\t<tr>\n";
echo "\t\t<td align='right' valign='top'>$setfont<b>Message:</b></td>\n";
Expand Down Expand Up @@ -419,6 +419,7 @@
{
while ($emrow = mysql_fetch_array($emresult))
{
//$to = $emrow['email'];
$to = $emrow['email'];
$sendmessage = $message;
$sendmessage = str_replace("{FIRSTNAME}", $emrow['firstname'], $sendmessage);
Expand All @@ -427,7 +428,7 @@
mail($to, $_POST['subject'], $sendmessage, $headers);
$udequery = "UPDATE tokens_{$_POST['sid']} SET sent='Y' WHERE tid={$emrow['tid']}";
$uderesult = mysql_query($udequery) or die ("Couldn't update tokens<br />$udequery<br />".mysql_error());
echo "[Invite Sent to {$emrow['firstname']} {$emrow['lastname']}]<br />\n";
echo "[Invite Sent to {$emrow['firstname']} {$emrow['lastname']} ($to)]<br />\n";
}
if ($ctcount > $emcount)
{
Expand Down Expand Up @@ -491,7 +492,7 @@
echo "\t</tr>\n";
echo "\t<tr>\n";
echo "\t\t<td align='right'>$setfont<b>From:</td>\n";
echo "\t\t<td><input type='text' $slstyle size='50' name='from' value='$surveyadminemail' /></td>\n";
echo "\t\t<td><input type='text' $slstyle size='50' name='from' value='$surveyadmin <$surveyadminemail>' /></td>\n";
echo "\t</tr>\n";
echo "\t<tr>\n";
echo "\t\t<td align='right'>$setfont<b>Subject:</td>\n";
Expand Down

0 comments on commit cc6158e

Please sign in to comment.