*/ $to = (!IS_WINDOWS) ? '"'.$username.'" <'.$email.'>' : $email; $from = '"PPhlogger support" <'.$admin_mail.'>'; $subj = "$strAccActivation - $username"; switch ($mail_mod) { case 'htmlmime': include MOD_HTMLMIMEMAIL; /** * Create the mail object. */ $mail = new htmlMimeMail(); /** * To set the text body of the email, we * are using the setText() function. This * is an alternative to the setHtml() function * which would obviously be inappropriate here. */ $mail->setText($body_txt); /** * This is used to add an attachment to * the email. */ $mail->addAttachment($attachment, 'pphlogger.js', 'text/js'); /** * Sends the message. */ $mail->setSubject($subj); $mail->setFrom($from); $result = $mail->send(array($to)); break; /* * libmail 1.3 * http://lwest.free.fr/doc/php/lib/index.php3?page=mail&lang=en * @author Leo West - lwest@free.fr */ case 'libmail': include MOD_LIBMAIL; $m= new Mail; // create the mail $m->From($from); $m->To($to); $m->Subject($subj); $m->Body($body_txt); // set the body //$m->Cc( "someone@somewhere.fr"); //$m->Bcc( "someoneelse@somewhere.fr"); //$m->Priority(4) ; // set the priority to Low $m->Attach($attachment, "text/js", "attachment", "pphlogger.js"); $m->Send(); // send the mail break; /* * plain email * Use this option, if you don't like to attach pphlogger.js to the confirmation email. * In this case you should adjust the /messages/email_newuser_xx.txt files. */ case 'plain': mail($to, $subj, $body_txt, 'From: '.$from); break; default: echo 'please set $mail_mod !'; break; } ?>