Page 1 of 1

Email won't accept attachments and email body together

Posted: Mon Sep 27, 2010 10:37 pm
by dangaskin
Hi guys,

I am having issues with my attachments in emails. In the code below if I comment everything out except the 'message' the email returns the message perfectly. If I do not comment anything out the email returns one attachment - the first content and no other content or email body. I know each of the 'content' happily carries an attachment as I have run them all with all the others commented out. So I guess what I am asking is, how do I add the 'message' and all 5 'content' to the $message['body'] at the same time?

Any help would be appreciated,
Dan

"!message" = Email body
"!content" = Attachment 1
"!content2" = Attachment 2
"!content3" = Attachment 3
"!content4" = Attachment 4
"!content5" = Attachment 5

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'] =  t('!message', array('!message' =>  $confirm), $language->language) . //email message
                          t('!content', array('!content' => $params['content']), $language->language) . //first content    
                          t('!content2', array('!content2' => $params['content2']), $language->language) . 
                          t('!content3', array('!content3' => $params['content3']), $language->language) . 
                          t('!content4', array('!content4' => $params['content4']), $language->language) .  
                          t('!content5', array('!content5' => $params['content5']), $language->language) .    
      break;