Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Using an alternate sendmail.cf file

by Sinister (Friar)
on Jul 13, 2001 at 17:35 UTC ( [id://96388]=note: print w/replies, xml ) Need Help??


in reply to Using an alternate sendmail.cf file

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 $_

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://96388]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2024-04-20 15:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found