Re: MIME:Lite

Re: MIME:Lite

am 21.02.2006 20:23:23 von lepidium

Stefan Kristukat schrieb:
> Hallo zusammen,
> ich habe versucht mit folgender Funktion ein Bild per Mail zu
> verschicken. Das klappt auch, nur würde ich es gerne beim Öffnen der
> Mail sehen und nicht nur als Attachment bekommen.

Hilft Dir dieses Beispiel weiter?

$msg = MIME::Lite->new(
To =>'you@yourhost.com',
Subject =>'HTML with in-line images!',
Type =>'multipart/related'
);
$msg->attach(Type => 'text/html',
Data => qq{
Here's my image:

}
);
$msg->attach(Type => 'image/gif',
Id => 'myimage.gif',
Path => '/path/to/somefile.gif',
);
$msg->send();

Quelle:
http://search.cpan.org/~yves/MIME-Lite-3.01/lib/MIME/Lite.pm #Send_an_HTML_document..._with_images_included!

Viele Grüße,
Sebastian

Re: MIME:Lite

am 22.02.2006 09:54:18 von Stefan Kristukat

Ah Klasse,
nun funktionierts.

Vielen Dank Allen


Stefan



Sebastian Kreß wrote:
> Stefan Kristukat schrieb:
>> Hallo zusammen,
>> ich habe versucht mit folgender Funktion ein Bild per Mail zu
>> verschicken. Das klappt auch, nur würde ich es gerne beim Öffnen der
>> Mail sehen und nicht nur als Attachment bekommen.
>
> Hilft Dir dieses Beispiel weiter?
>
> $msg = MIME::Lite->new(
> To =>'you@yourhost.com',
> Subject =>'HTML with in-line images!',
> Type =>'multipart/related'
> );
> $msg->attach(Type => 'text/html',
> Data => qq{
> Here's my image:
>
> }
> );
> $msg->attach(Type => 'image/gif',
> Id => 'myimage.gif',
> Path => '/path/to/somefile.gif',
> );
> $msg->send();
>
> Quelle:
> http://search.cpan.org/~yves/MIME-Lite-3.01/lib/MIME/Lite.pm #Send_an_HTML_document..._with_images_included!
>
>
> Viele Grüße,
> Sebastian