Thread Email aus Perl senden unter Windows und Unix? (21 answers)
Opened by korkak at 2013-07-13 21:36

rosti
 2013-07-13 23:40
#168856 #168856
User since
2011-03-19
3196 Artikel
BenutzerIn
[Homepage]
user image
Unter Windows:

c:/usr/sbin/sendmail.cmd
erstellen

darin steht:
sendmail.pl %1

die sendmail.pl liegt daneben. darin steht:
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use Net::SMTP;

my $mo = {
        host => 'host',
        user => 'user',
        pass => 'pass',
};


my $smtp = Net::SMTP->new($mo->{host}) or die '???';
$smtp->auth($mo->{user}, $mo->{pass});
$smtp->hello('yahoo.de');
$smtp->mail('nmqrstx-18@yahoo.de');
$smtp->to('nmqrstx-18@yahoo.de');
$smtp->data($ARGV[0]);
$smtp->send;
$smtp->quit;


Deine Mails gehen per PIPE an sendmail. Unter Linux genauso.
Last edited: 2013-07-13 23:41:50 +0200 (CEST)

View full thread Email aus Perl senden unter Windows und Unix?