Thread Multipart Mail: Plaintext / HTML mit Grafik (6 answers)
Opened by Captain Future at 2007-04-05 16:59

Captain Future
 2007-04-10 17:39
#9892 #9892
User since
2004-01-16
19 Artikel
BenutzerIn
[default_avatar]
Hi, hab das mal so gemacht:


Code: (dl )
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
31
32
33
34
35
36
37
38
39
40
41
my $msg = MIME::Lite->new(


From => "$mailsender",


To => "$user_email",


Subject => "$subject",


Type => 'multipart/mixed',


);
$msg->attach( Type => 'text/plain; charset="utf-8"',

Encoding => 'quoted-printable',

Data => "$text_mail_message");

$msg->attach( Type => 'text/html; charset="utf-8"',

Encoding => 'quoted-printable',

Data => "$html_mail_message");

$msg->attach( Type => 'image/gif',

Encoding => 'base64',

Path => "$dir_pic"

);




MIME::Lite->send('sendmail', "/usr/sbin/sendmail -t -oi");
$msg->send;


Wenn das ganze als multipart/alternative raus geht wird im Mail-Client text und html gleichzeitig angezeigt und die Grafik nur als Anhang.

Und bei utf-8 subject daten geht garnix mer - kein mailversand. hmmm

Ich glaube den HTML-Teil mit Grafik muss ich nochmal in ein multipart/mixed Stück kapseln aber wie mit dem Modul in der Doc stehen auch nur text mit daetianhang und nur html mit Dateianhang Beispiele.

Ciao Captain Future

View full thread Multipart Mail: Plaintext / HTML mit Grafik