Hi all,

im generating a mail with n elements. The first element is always a
text/plain part, and the follwoings ar attached.

here is the codeblock:
----------------------------------------------------------------------------
--------------------
sub senden
{
        ($nick, $To, $Cc, $Bcc, $Subject, $body, $attached) = @_;
        $msg    =~ s/\r//g;
        @msg    = split(/\n/, $msg);
        # ataached
        @attachedfiles = split(/;/, $attached);

        $msg =
E::Lite->new( 
                                      From    =>"$nick",
                                     To      =>"$To",
                                         Cc      =>"$Cc",
                                                                  Bcc            
=>"$Bcc",
                                        Subject =>"$Subject",
                                          Type    =>'multipart/mixed'
                                         );

    $msg->attach(Type     =>'TEXT',   
                 Data     =>"$body"
                 );  

        foreach $at(@attachedfiles)
        {
                ($name, $suf) = split(/\./, $at);
                if($suf eq "gif")
                {
                        $msg->attach(   Type     =>'image/gif',
                                 Path     =>"$s_dir/$nick/append/$at",
                                 Filename =>"$at"
                             );
                }
                elsif($suf eq "jpg")
                {
                        $msg->attach(   Type     =>'image/jpeg',
                                 Path     =>"$s_dir/$nick/append/$at",
                                 Filename =>"$at"
                             );
                }
                elsif($suf eq "html")
                {
                        $msg->attach(   Type     =>'text/html',
                                 Path     =>"$s_dir/$nick/append/$at",
                                 Filename =>"$at"
                             );
                }
                elsif($suf eq "htm")
                {
                        $msg->attach(   Type     =>'text/html',
                                 Path     =>"$s_dir/$nick/append/$at",
                                 Filename =>"$at"
                             );
                }
                elsif($suf eq "txt")
                {
                        $msg->attach(   Type     =>'text/plain',
                                 Path     =>"$s_dir/$nick/append/$at",
                                 Filename =>"$at"
                             );
                }
                else
                {
                        $msg->attach(   Type     =>'APLICATION',
                                 Path     =>"$s_dir/$nick/append/$at",
                                 Filename =>"$at"
                             );
                }
        }

         MIME::Lite->send('smtp', "localhost");
    $msg->send;

        # kill attached ! 
        foreach $at(@attachedfiles)
        {
                unlink("$s_dir/$nick/append/$at");
        }
        print "Content-type: text/html\n\n";
        print "<script Language=\"javascript\">\n";
        print " alert(\"Mail wurde versand\");\n";
        print " window.close();\n";
        print "</script>\n";
        exit;
}
------------------------------------------
if I sending a mail to my Outlook account, with a text (firstpart) and a Atached html 
file, the html shown in my mail and the text is as Attachment !

Its Upside-down ! 

Why ? 
Can I controll the Stack ? 


Please Help me, i trying to fix this since days... no result. 

thanx 
kris

_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web

Reply via email to