I think I would just open a pipe to sendmail en put in the stuff. For attachments you can mime encode your self and send a self constructed multipart message. This isn't to hard.

Something like this:

#!/usr/bin/perl use MIME::Base64; my $fullname = "Webmaster 2organize.com"; my $username = "webmaster"; my $hostname = "2organize.com"; my $my_config_file = "config"; my $from = "$fullname <$username\@$hostname>"; my $bound = "e7e0ec52ed9c9026a8e3f293d87abe92"; open (MAIL,"|sendmail -C $my_config_file") || Error("Couldn't open pip +e to mal injector\n"); print MAIL "Content-Type: multipart/mixed; boundary=\"$bound\"\n"; print MAIL "From: $from\n"; print MAIL "To: $to\n"; print MAIL "Bcc: $bcc\n"; print MAIL "Subject: Online vacature voor $app\n\n"; print MAIL "$mail_body\n"; foreach my $file (@ARGV) open(FILE,"<$file) || die("Couldn't open $file!\n"); seek (FILE, 0, 0); my $content = ""; while (<FILE>) { $content .= $_; } print MAIL "\n--$bound\n"; print MAIL "Content-type: $type{ExtGetter($file)}\n"; print MAIL "Content-Disposition: attachment; filename=\"$filename\"\ +n"; print MAIL "Content-Transfer-Encoding: base64\n\n"; print MAIL encode_base64($content); print MAIL "\n"; }


Of course this untested and serves merely as an example

Sinister greetings.
perldoc -q $_

In reply to Re: Using an alternate sendmail.cf file by Sinister
in thread Using an alternate sendmail.cf file by Dalin

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.