I am using this code for sending request to add me as a friend.
in my site there has number of users.
Problem: if any user log in and send a friend request to
his friend the message is going in this way
"site name".
But i want
"User name"
this is my function.
function invitefriends_mail($key, &$message, $params) {
$invite_message = $params->message;
$first_name = $params->fname;
$last_name = $params->lname;
$user_mail = $params->mail;
switch($key) {
case 'notice':
$message['from'] .= t('@useremail',array('@useremail'=> $params->mail));
$message['subject'] = t('@firstname @lastname invites you to join SportsHero',array('@firstname'=>$params->fname,'@lastname'=>$params->lname));
$bodydata = t("somthing........");
$bodydata .= "\n\nPrivate Message \n ------------------\n $invite_message\n\n";
$message['body'] = t($bodydata, $variables, $language->language);
break;
}
}
drupal_goto(" ");
?>
Thanks
Comments
Comment #1
nicholasthompsonSending to what looks like a more relevant module....
Comment #2
avpadernoComment #3
ryan osītis commented