Email problem
Posted: Sun Apr 13, 2003 11:19 am
I have been trying to fix some code.
Below find my code. Thru an admin of my script I am trying to format it and also when a person gets the email not only do i want it to look right but I want the link to be clickable. If anyone can tell me what i may be missing or what is wrong please do so asap. It seems that by using <br> tags in admin to format the emails works great..But $link is just a text link and not clickable.
Thanks
Below find my code. Thru an admin of my script I am trying to format it and also when a person gets the email not only do i want it to look right but I want the link to be clickable. If anyone can tell me what i may be missing or what is wrong please do so asap. It seems that by using <br> tags in admin to format the emails works great..But $link is just a text link and not clickable.
Thanks
Code: Select all
<?
function MsgFromTpl($to,$subj,$tpl)
{
global $lname,$email,$fname,$login,$pswd,$link,$ADMIN_MAIL;
$h = fopen("$tpl","r");
if(!$h) return;
$msg = "";
while(!feof($h))
$msg .= fgetc($h);
fclose($h);
ereg_replace(""","'",$msg);
eval("\$msg="$msg";");
/* To send HTML mail, you can set the Content-type header. */
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
/* additional headers */
$headers .= "From: $ADMIN_MAIL\r\n";
/* and now mail it */
mail($to, $subj , $msg, $headers);
}
function MsgToAdmin_UserReg($to,$subj,$tpl)
{
global $lname, $email, $fname, $login, $pswd, $link, $ADMIN_MAIL;
$h = fopen("$tpl","r");
if(!$h) return;
$msg = "";
while(!feof($h))
$msg .= fgetc($h);
fclose($h);
ereg_replace(""","'",$msg);
eval("\$msg="$msg";");
@mail($to,$subj,$msg,"From: $ADMIN_MAIL \r\n"."Reply-To: $email \r\n");
}
function MsgToAdmin_UserSignUp($to,$subj,$tpl)
{
global $lname, $email, $fname, $login, $pswd, $link, $ADMIN_MAIL;
global $username,$password;
$h = fopen("$tpl","r");
if(!$h) return;
$msg = "";
while(!feof($h))
$msg .= fgetc($h);
fclose($h);
ereg_replace(""","'",$msg);
eval("\$msg="$msg";");
@mail($to,$subj,$msg,"From: $ADMIN_MAIL \r\n"."Reply-To: $ADMIN_MAIL \r\n");
}
function MsgToAdmin_BannDelete($to,$subj,$tpl,$url,$name)
{
global $ADMIN_MAIL;
$h = fopen("$tpl","r");
if(!$h) return;
$msg = "";
while(!feof($h))
$msg .= fgetc($h);
fclose($h);
ereg_replace(""","'",$msg);
eval("\$msg="$msg";");
@mail($to,$subj,$msg,"From: $ADMIN_MAIL \r\n"."Reply-To: $ADMIN_MAIL \r\n");
}
function MsgToAdmin_CampAdd($to,$subj,$tpl,$url)
{
global $ADMIN_MAIL;
$h = fopen("$tpl","r");
if(!$h) return;
$msg = "";
while(!feof($h))
$msg .= fgetc($h);
fclose($h);
ereg_replace(""","'",$msg);
eval("\$msg="$msg";");
@mail($to,$subj,$msg,"From: $ADMIN_MAIL \r\n"."Reply-To: $ADMIN_MAIL \r\n");
}
function MsgToUser_CampAppr($to,$subj,$tpl,$url,$name)
{
global $ADMIN_MAIL;
$h = fopen("$tpl","r");
if(!$h) return;
$msg = "";
while(!feof($h))
$msg .= fgetc($h);
fclose($h);
ereg_replace(""","'",$msg);
eval("\$msg="$msg";");
@mail($to,$subj,$msg,"From: $ADMIN_MAIL \r\n"."Reply-To: $ADMIN_MAIL \r\n");
//echo "mail sent to user";
}
function MsgToUser_CampDrop($to,$subj,$tpl,$url,$name)
{
global $ADMIN_MAIL;
$h = fopen("$tpl","r");
if(!$h) return;
$msg = "";
while(!feof($h))
$msg .= fgetc($h);
fclose($h);
ereg_replace(""","'",$msg);
eval("\$msg="$msg";");
@mail($to,$subj,$msg,"From: $ADMIN_MAIL \r\n"."Reply-To: $ADMIN_MAIL \r\n");
}
function MsgToAdmin_BannAdd($to,$subj,$tpl,$url)
{
global $ADMIN_MAIL;
$h = fopen("$tpl","r");
if(!$h) return;
$msg = "";
while(!feof($h))
$msg .= fgetc($h);
fclose($h);
ereg_replace(""","'",$msg);
eval("\$msg="$msg";");
@mail($to,$subj,$msg,"From: $ADMIN_MAIL \r\n"."Reply-To: $ADMIN_MAIL \r\n");
}
function MsgToUser_BannDrop($to,$subj,$tpl,$url,$name)
{
global $ADMIN_MAIL;
$h = fopen("$tpl","r");
if(!$h) return;
$msg = "";
while(!feof($h))
$msg .= fgetc($h);
fclose($h);
ereg_replace(""","'",$msg);
eval("\$msg="$msg";");
@mail($to,$subj,$msg,"From: $ADMIN_MAIL \r\n"."Reply-To: $ADMIN_MAIL \r\n");
}
function MsgToUser_LowCredit($to,$subj,$fname,$url,$tpl)
{
global $ADMIN_MAIL;
$h = fopen("$tpl","r");
if(!$h) return;
$msg = "";
while(!feof($h))
$msg .= fgetc($h);
fclose($h);
ereg_replace(""","'",$msg);
eval("\$msg="$msg";");
@mail($to,$subj,$msg,"From: $ADMIN_MAIL \r\n"."Reply-To: $ADMIN_MAIL \r\n");
}
function MsgToUser_BannAppr($to,$subj,$tpl,$url,$name)
{
global $ADMIN_MAIL;
$h = fopen("$tpl","r");
if(!$h) return;
$msg = "";
while(!feof($h))
$msg .= fgetc($h);
fclose($h);
ereg_replace(""","'",$msg);
eval("\$msg="$msg";");
@mail($to,$subj,$msg,"From: $ADMIN_MAIL \r\n"."Reply-To: $ADMIN_MAIL \r\n");
}
?>