Code: Select all
$email = $this->emailContent; // get the template
// some manipulation with content - insert name, current date and then
$mailer = new Swift(new Swift_Connection_SMTP($address));
$cid = $mailer->addImage($this->config['image_file']);
$email = mb_eregi_replace('image_name', $cid, $email);
if ($mailer->authenticate($user, $pass) {
$mailer->send($toAddress, $address, 'test', $email);
}
else echo 'mailer failed to connect';
$mailer->close();And the problem is that my image isn't even attached to e-mail at all! Should I do anything more? I thought that simple addImage method will be OK.<img src="image_name" style="some_style_over_here"/>
Thanks in advance
phobos