<?php require("class.phpmailer.php"); public $login, $password, $server, $from, $from_mail, $title, $template; public function __construct($login, $password, $server, $from, $from_mail, $title, $template) { $this -> GetServerSetting($login, $password, $server, $from, $from_mail, $title, $template); } public function GetServerSetting($login, $password, $server, $from, $from_mail, $title, $template) { $this -> Username = $login; $this -> Password = $password; $this -> Host = $server; $this -> FromName = $from; $this -> From = $from_mail; $this -> Subject = $title; $this -> Body = $template; } function send_invite($to) { $this -> Mailer = "smtp"; $this -> SMTPAuth = true; $this -> IsHTML(true); $this -> AddAddress($to, $to); $this -> Send(); } } ?>
Mam mniej więcej coś takiego... ale nie mogę wrzucić templatka w smarty

<?php $mail = new mail('mail@wp.pl', 'haslo', 'mail.costam.pl', 'tralala', 'mail@wp.pl', 'Witaj testowy', $smarty->fetch('mails/invite.tpl')); ?>
Mógłby ktoś pomóc ?