my $email = Email::Simple->create( header => [ To => $p->{email_to}, Cc => $p->{email_cc}, From => $CONF->{smtp}->{from}, Subject => $sub ], body => $str ); if($DRYRUN){ print "---- EMAIL ----\n${$email->{body}}\n---- END FO + EMAIL ----\n" if $DEBUG; } elsif($CONF->{smtp}->{enabled}) { # Do some more emailing and stuff below... my $transport; $transport = Email::Sender::Transport::SMTP->new({ host => $CONF->{smtp}->{hos +t}, port => $CONF->{smtp}->{por +t}, ssl => $CONF->{smtp}->{ssl +}, sasl_username => $CONF->{smtp}->{sas +l_username}, sasl_password => $CONF->{smtp}->{sas +l_password}, allow_partial_success => $CONF->{smtp}->{all +ow_partial_success}, helo => $CONF->{smtp}->{hel +o}, localaddress => $CONF->{smtp}->{loc +aladdress}, localport => $CONF->{smpt}->{loc +alport}, timeout => $CONF->{smpt}->{tim +eout} }); sendmail($email, { transport => $transport }); }
In reply to Re^3: Need to send an email through my SMTP server using Perl
by faber
in thread Need to send an email through my SMTP server using Perl
by Logic_Bomb421
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |