Jump to content

lummi

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Posts posted by lummi

  1. 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:

    [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);[/code]
       

    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
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.