Nicolas François wrote: > Hello Torsten and Eugene, > > I will have a look at Email::Sender. > > What I fear is that the user will have to configure Email::Sender so that > it works, and I would like to avoid adding tons of options to send emails. What is really needed is just compose a valid mail and do '/usr/bin/sendmail -t < file'. Well, code may say better than me, part of my patch:
-8<-
my $tempsendfile = '/tmp/tempsendfile';
open(TEMPMAIL, "> $tempsendfile") or die "Cannot open even simple temp
file :(";
my $msg;
$msg .= "From: ${$mail}{'From'}\n";
$msg .= "To: ${$mail}{'To'}\n";
$msg .= "Subject: ${$mail}{'Subject'}\n";
$msg .= "X-Mail-Originator: ${$mail}{'X-Mail-Originator'}\n";
$msg .= "Content-Type: ${$mail}{'content-type'}\n";
$msg .= "${$mail}{body}";
print TEMPMAIL $msg;
qx{/usr/sbin/sendmail -t < $tempsendfile}
->8-
These lines are ugly, poor-styled, unsecure etc... but they are working.
> By the way, did you try to use the --smtp or --postpone options?
smtp didn't work for me (how can it get my username and password for smtp?), and
--postpone is for mutt users.
Have a good year too.
--
Eugene V. Lyubimkin aka JackYF, JID: jackyf.devel(maildog)gmail.com
Ukrainian C++ developer, Debian Maintainer, APT contributor
signature.asc
Description: OpenPGP digital signature

