Page 1 of 1

2 $message['body'] sections in email not working

Posted: Tue Sep 28, 2010 11:07 pm
by dangaskin
Hi,

I want to have 2 $message['body'] sections in my email. The problem is that the second one overwrites the first one. If I take the second one out the first one writes perfectly but I if I leave the second one only the second will send.

Thanks,
Dan

Code: Select all

      case 'application':
       $confirm = MakeApplicantMessage($params['fname'], $params['title']);
      $message['headers']['Content-Type'] = $params['content-type'];
      $message['subject'] = t('!subject', array('!subject' => $params['subject']),$language->language);
      $message['body']['Message'] = t('!message', array('!message' =>  $confirm), $language->language); //1st $message['body'] for email message
      $message['body']['Content'] .= t('!content', array('!content' => $params['content']), $language->language);  //2nd $message['body'] for attachments
   

Re: 2 $message['body'] sections in email not working

Posted: Wed Sep 29, 2010 1:02 am
by requinix
You can't have two bodies in an email message. If you want attachments, that's a completely separate issue: read the documentation for whatever you're using on how to do it.