MailMime() public static method

Send an mime mail possibly only text or text + html.
public static MailMime ( $recipients, string $text = false, string $html = false, array $hdrs )
$text string
$html string
$hdrs array
Ejemplo n.º 1
0
    public function sendQuestioneerInvitation()
    {
        $MetaInterview = new MetaInterview($this->getId());

        $headers = array(
            'From' => $this->getProperty('invitation_sender'),
            'Subject' =>  $this->getProperty('invitation_subject')
        );

        // invite questioneers
        foreach (self::getQuestioneersWantInvitation() as $Questioneer) {
            $MetaUser = new MetaUser($Questioneer->getUserId());

            $parsed = $this->smarty_parse_inviation_template($MetaInterview, $MetaUser, 'questioneer');
            $parsed = str_replace("\r\n",  "\n", $parsed);
            #$parsed = str_replace("\n",  "\r\n", $parsed);

            CampMail::MailMime($Questioneer->getEmail(), null, $parsed, $headers);
        }
        $this->setProperty('questioneer_invitation_sent', strftime('%Y-%m-%d %H:%M:%S'));
    }