Put plain text body first
authorJamie Cameron <jcameron@webmin.com>
Thu, 5 Mar 2009 08:22:38 +0000 (08:22 +0000)
committerJamie Cameron <jcameron@webmin.com>
Thu, 5 Mar 2009 08:22:38 +0000 (08:22 +0000)
mailboxes/send_mail.cgi

index 73aa0e5..1eb50a4 100755 (executable)
@@ -97,14 +97,14 @@ if ($in{'body'} =~ /\S/) {
                # Add the plain-text body
                local $mt = "text/plain";
                if ($plainbody =~ /[\177-\377]/) {
-                       push(@attach,
+                       unshift(@attach,
                          { 'headers' => [ [ 'Content-Type', $mt ],
                                           [ 'Content-Transfer-Encoding',
                                             'quoted-printable' ] ],
                            'data' => quoted_encode($plainbody) });
                        }
                else {
-                       push(@attach,
+                       unshift(@attach,
                          { 'headers' => [ [ 'Content-Type', $mt ],
                                           [ 'Content-Transfer-Encoding',
                                             '7bit' ] ],