#!/usr/bin/perl use strict; use warnings; use MIME::Lite::TT::HTML; my %params; $params{firstname} = 'MyFirstName'; $params{lastname} = 'MyLastName'; my %options; $options{INCLUDE_PATH} = '/path/to/template'; my $msg = MIME::Lite::TT::HTML->new( From => 'email@domain.com', To => 'otheremail@otherdomain.com', Subject => 'Test 1', Timezone => 'UTC', Type => 'multipart/related', Encoding => 'base64', Template => { html => 'template.html', }, Charset => 'utf8', TmplOptions => \%options, TmplParams => \%params, ); $msg->attach( Type => 'text/html', Data => qq{ <body> Here is <i>my</i> image: <img src="cid:image.png"> </body> }, ); $msg->attach( Type => 'image/png', Path => '/path/to/image/image.png', Id => 'img1', ); $msg->send( 'smtp', 'smtp.somedomain.com', Debug => 1, Timeout => 60, );
In reply to Re: How do I send ONLY HTML mail using MIME::Lite::TT::HTML
by Khen1950fx
in thread How do I send ONLY HTML mail using MIME::Lite::TT::HTML
by trebor
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |