Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re^2: Send Email to GMAIL with html body

by Maktub (Initiate)
on Mar 23, 2013 at 16:13 UTC ( #1025039=note: print w/replies, xml ) Need Help??

in reply to Re: Send Email to GMAIL with html body
in thread Send Email to GMAIL with html body


Thanks for your reply.

I write this code:
use strict; use Email::Sender::Simple qw(sendmail); use Email::Simple; use Email::Simple::Creator; use Email::Sender::Transport::SMTP::TLS; use Email::Sender::Simple qw(try_to_sendmail); my $username = ''; my $password = 'xxx'; my $to = ''; my $from = ''; my $subject = 'Test'; my $transport = Email::Sender::Transport::SMTP::TLS->new( host => '', port => 587, username => $username, password => $password ); my $email = Email::Simple->create( header => [ To => $to, From => $from, Subject => $subject, ], body => "This message is short, but at least it's cheap.\n", ); sendmail($email, { transport => $transport });

I can send simple text email. It works fine. What changes i need to send html email? If i use Mime i cannot use Mail::Sender.

Can i create another type of $email that works with sendmail?

Thanks. Andrea

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1025039]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2018-11-16 06:04 GMT
Find Nodes?
    Voting Booth?
    My code is most likely broken because:

    Results (193 votes). Check out past polls.

    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!