1
2
3
4
5
6
7
8
9
10
11
### Known Mail/MIME fields... these, plus some general forms like
### "x-*", are recognized by build():
my %KnownField = map { $_ => 1 }
qw(
bcc cc comments date encrypted
from keywords message-id mime-version organization
received references reply-to return-path sender
subject to
approved
);
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
my $mydom = 'ox.bow'; # eigene Domain my $mid; ### Message-ID generieren lassen use Email::MessageID; $mid = Email::MessageID->new( host => $mydom ); ### ### Message-ID selbst setzen $mid = "4711-0815-oxnard77-xyz@" . $mydom; ### my %conf = ( USER => 'm.blah-me@ox.bow', TO => 'murks@spam.local' ); my %headers = ( From => qq"<$conf{USER}>", To => qq"<$conf{TO}>", Subject => q'No SPAM please!', 'Message-ID' => $mid ); my $body = "\nTEST"; my $msg = MIME::Lite ->new ( %headers, 'X-Mailer' => 'myMail/1.1', Data => $body, Type => 'text/plain' ); $msg->print;
Guest chrisperlGanz kurz noch am Rande:
Ich lese immer wieder in einigen Foren, man soll auch gar nicht mehr MIME::Lite einsetzen, ist da was wahres dran?