Klaus Mock: Mozilla mail: jetzt wird ärgerlich(kein Anhang)

Beitrag lesen

Hallo,

MIME-Version: 1.0
Content-Type: multipart/mixed; boundary = b74531cbd997b39bb5f981cbf3138ef13

Gehören da nicht normalerweise Anführungszeichen rein:
Content-Type: multipart/mixed; boundary = "b74531cbd997b39bb5f981cbf3138ef13"

This is a MIME encoded message.

--b74531cbd997b39bb5f981cbf3138ef13
Content-Type: text/plain
Content-Transfer-Encoding: base64

ZGIyNzA5NF8yMDAyLTA5LTA3LnNxbC5ncGcK

--b74531cbd997b39bb5f981cbf3138ef13
Content-Type: multipart/x-gzip; name = "db_ABC_2002-09-07.sql.gpg"

das sollte eigentlich application/x-gzip sein. Eine ordentliche MIME-Bibliothek würde diesen MIME-Typ mit dem Encoding kombiniert gar nicht zulassen.

Content-Transfer-Encoding: base64

hQEOAzuqNBHf9/bnEAP/YbV3C0i+1F9dDZkzopaIWKvP2QjsSTr8s+I6k8/Xugsft3OvFUZhYRhs
D+sycDWvfznXH2pQf3tJ/Mc4jNe...

[ein paar 100 KB]
                           ...3T9RvO45ALk8zOdp9p/7FeDgPbc63BXLQ8Fzg+6
8qpHuzFe72JjqGc/5LTvDEyloQ8Vf22YZXRL/A3/WhAjOcAsRVVGWTHuzFe72JjqGc/5LTvDEyloQ8Vf22YZXRL/A3/WhAjOcAsRVVGWT

und am Ende müßte dann doch noch ein
--b74531cbd997b39bb5f981cbf3138ef13--
stehen, oder? (beachte die -- am Ende).

Hat jemand ne Idee wie ich das beheben kann?

Korrekte MIME-Mails wären die Lösung. Mit Perl wäre Dir das nicht passiert *g*:
use MIME::Entity;
my $mail= MIME::Entity->build(Type        => "text/plain",
                               Encoding    => "base64",
                               Data        => [@messagelines]);

$mail->attach(Path     => 'x.pgp',
                 Type     => "application/x-gzip",
                 Encoding => "base64"
                 );
print $mail->as_string;

Das ganze noch mit Mail::Mailer kombiniert, und alles wird gut;-)

Grüße
  Klaus