in general, it's the policy of our site not to send HTML emails. But we're seeing a problem specifically with mail being sent to our own mail server in which the mails are arriving with the HTML exposed.

We want to strip the HTML out of these outgoing emails. I've looked at the code that generates this, and I'm not sure what's inserting the HTML:

<?php
    case FLAG_FRIEND_PENDING:
      // sender added you as a friend
      $email['subject'] = t('!username added you as a friend !site', array('!username' => $sender->name, '!site' => variable_get('site_name', '')));
      $email['body'] = t('!firstname added you as a friend on !site. We need to confirm that you know !firstname in order for you to be friends on !site.

      To confirm this friend request, follow the link below:
      !link

      !message

      Thanks,
      The !site Team', array(
        '!firstname' => isset($sender->firstname) ? $sender->firstname : $sender->name,
        '!site' => variable_get('site_name', ''),
        '!message' => $flag->friend_message ? t('Message:'). $flag->friend_message : '',
        '!link' => url('user/'. $recipient->uid .'/friends', array('absolute' => TRUE)),
        ));
      break;
?>

any clues on where we can override this and just send plain text?

Comments

friolator’s picture

Status: Active » Closed (fixed)

one of our input filters was messed up, causing this to happen. not sure how it got out of whack, but it's all good now.