Jump to content


Photo

PEAR MIME problems


  • Please log in to reply
2 replies to this topic

#1 lummi

lummi
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 06 October 2006 - 10:26 AM

Hello all freaks!  ;D

I'm a n00b so please have understanding if my question is little bit wierd.
I am using PearMailfactory and sending out newsletters and different emails to users.
Therer is one problem though, and that is when sending to yahoo mail accounts - the email body is blank (however if I "save page as" and save page .html the message is visable)
Works ok with gmail and hotmail but not yahoo.

Here is the code:

/*Parsing template with selected template and user*/
        function parseTemplate()
        {
                $this->_parsed_template['subject'] = $this->_smarty->fetch('db:'.$this->_template['subject'].$this->_language_id);
                $this->_parsed_template['text'] = $this->_smarty->fetch('db:'.$this->_template['text'].$this->_language_id);
        }

        /*Set text and subject of message directly from methods values*/
        function setMessage($subject, $text)
        {
                if (!$subject || !$text)
                        die(TEXT_OR_SUBJECT_NOT_DEFINED);
                $this->_parsed_template['subject'] = $subject;
                $this->_parsed_template['text'] = $text;
        }

function sendMail($email = false)
        {
                if (!$this->_hdrs['From'])
                        $this->setFrom(PROJECT_INFO_EMAIL);
                if (!$email)
                        $email = $this->_users[0]['email'];
                $this->setHTMLBody($this->_parsed_template['text']);
                $this->_hdrs['Subject'] = $this->_parsed_template['subject'];
                if (defined('MAIL_CHARSET'))
                        list($charsets['head_charset'], $charsets['text_charset'], $charsets['html_charset']) =
                                Array(MAIL_CHARSET, MAIL_CHARSET, MAIL_CHARSET);
                $body = $this->get($charsets);
                $hdrs = $this->headers($this->_hdrs);
                $this->_mail->send($email, $hdrs, $body);
   

So why is the message not visable in yahoo mail???
Would appriciate if someone could help me out here. The templates that is parsed reside in the db, do I have to add a <body> tag or something in the template?

Regards,
Lummi

#2 lummi

lummi
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 06 October 2006 - 11:12 AM

Someone?
Please it's a live site and my boss is screaming and is angry @ me why I have not yet figured it out  :(
Any idea will be highly appriciated!



#3 lummi

lummi
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 06 October 2006 - 01:52 PM

Just checked the headers...
Could it be that Content-Transfer-Encoding is empty without any values?

Regards,
Lummi




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users