Jump to content

email variable in mail footer.


pietbez

Recommended Posts

i am so new to this, can someone please tell me how to make <email> into a variable in the footer, just like <name> is currently a varialble in the header.

 

thaks

 

{

//$headers .= "To: $name <$email>" . "\r\n";

$hf['header'] = str_replace('[name]', $name, $hf_header_tmp);

$let_info['content'] = str_replace('[name]', $name, $let_info_tmp);

$letter_body =$hf['header'].'<br>'.$let_info['content'].'<br>'.$hf['footer'].'<br>';

$letter_body = str_replace("\n.", "\n..", $letter_body);

 

if (mail($email, $letter_title, $letter_body, $headers))

++$oks;

else ++$bads;

}

Link to comment
https://forums.phpfreaks.com/topic/48864-email-variable-in-mail-footer/
Share on other sites

i am blatantly stupid. this is what i did and ofcource didnt work

 

{
  $name = $members[$i]['name'];
  $email = $members[$i]['email'];
  
  if (valid_mail($email)) 
  { 
   //$headers .= "To: $name <$email>" . "\r\n";  
   $hf['header'] = str_replace('[name]', $name, $hf_header_tmp);
   $hf['footer'] = str_replace("[email]", $email, $hf['footer']);
   $let_info['content'] = str_replace('[name]', $name, $let_info_tmp);
   $letter_body =$hf['header'].'<br>'.$let_info['content'].'<br>'.$hf['footer'].'<br>';
   $letter_body = str_replace("\n.", "\n..", $letter_body);
   
    if (mail($email, $letter_title, $letter_body, $headers))
    ++$oks;
    else ++$bads;
  }
  else 
  {
   ++$invalids;
  }
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.