help with mailto body
Posted: Fri Apr 23, 2010 1:04 pm
Hello!
I'm maintaining a drupal site and new to PHP. On the site's contact us page there are a couple of email links. If a user clicks the mailto for 'email2'@email2.com' I want to include some specific text in the body of the email. Here is my code so far:
function theme_emailbox($row) {
if($row->email) {
$lnk = 'mailto:'.$row->email;
$lnk .='?SUBJECT=here_is_the_subject_for_all';
$lnk .='&BODY=here_is_the_body_BUT_only_when_mailto_is_email2';
if($row->cc) $lnk .= '&CC='.$row->cc;
return l(t($row->section),$lnk,null,null,null,false,true);
}
}
Of course the subject and body get filled in the same regardless of which mailto link was clicked. How can I set a condition that if the mailto is email2, include the body text, otherwise do not?
Thanks so much for any help!!
I'm maintaining a drupal site and new to PHP. On the site's contact us page there are a couple of email links. If a user clicks the mailto for 'email2'@email2.com' I want to include some specific text in the body of the email. Here is my code so far:
function theme_emailbox($row) {
if($row->email) {
$lnk = 'mailto:'.$row->email;
$lnk .='?SUBJECT=here_is_the_subject_for_all';
$lnk .='&BODY=here_is_the_body_BUT_only_when_mailto_is_email2';
if($row->cc) $lnk .= '&CC='.$row->cc;
return l(t($row->section),$lnk,null,null,null,false,true);
}
}
Of course the subject and body get filled in the same regardless of which mailto link was clicked. How can I set a condition that if the mailto is email2, include the body text, otherwise do not?
Thanks so much for any help!!