#!/usr/bin/perl sub aac{ my($gac5, $jpg9, $c06p, $e2pf, $bjcg, $e09k, $gn8b, $doea, $bk2d) = @_; if (lc $mailusing eq 'sendmail') { if ($username) { open (MAIL, "|$mailprog -t -f \"$jpg9\" ") || print ("Can't open $mailprog!\n"); } else { open (MAIL, "|$mailprog -t") || print ("Can't open $mailprog!\n"); } print MAIL "To: $gac5\n"; print MAIL "From: $e09k <$jpg9>\n"; print MAIL "Reply-To: $e09k <$jpg9>\n"; print MAIL "Subject: $c06p\n"; print MAIL "MIME-Version: 1.0\r\n"; print MAIL "Content-Type: multipart/alternative\;\n boundary=boundary42\r\n"; print MAIL "--boundary42\r\n"; if (($bk2d) || (!($doea))) { print MAIL "Content-Type: text/plain; charset=\"ISO-8859-1\"\r\n"; print MAIL "Content-Transfer-Encoding: 8bit\r\n\r\n"; print MAIL "$gn8b\n"; if (!($doea)) { print MAIL "--boundary42--\r\n"; } else { print MAIL "--boundary42\r\n"; } } if ($doea) { print MAIL "Content-Type: text/html; charset=\"ISO-8859-1\"\r\n"; print MAIL "Content-Transfer-Encoding: 8bit\r\n\r\n"; $e2pf =~ s/\r//g; print MAIL "$e2pf"; print MAIL "--boundary42--\r\n"; } print MAIL "\n\n"; close MAIL; } else { $j48a = &aad($gac5, $jpg9, $c06p, $e2pf, $bjcg, $e09k, $gn8b, $doea, $bk2d); if ($j48a < 1) {print "
\nSendmail error # $j48a
\n";} } } sub aad{ my ($gac5, $jpg9, $c06p, $e2pf, $bjcg, $e09k, $gn8b, $doea, $bk2d) = @_; my ($eplb) = $jpg9; if (!$gac5) { return -8; } my ($h9gj, $jolj, $g133); my ($fj18) = 2; my ($gjel) = 1; $h9gj = (getprotobyname('tcp'))[2]; $jolj = 25; $kb2k = ($smtp_addr =~ /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/) ? pack('C4',$1,$2,$3,$4) : (gethostbyname($smtp_addr))[4]; if (!defined($kb2k)) { return -1; } if (!socket(S, $fj18, $gjel, $h9gj)) { return -2; } if (!connect(S, pack('Sna4x8', $fj18, $jolj, $kb2k))) { return -3; } select(S); $| = 1; select(STDOUT); $_ = ; if (/^[45]/) { close S; return -4; } print S "helo localhost\r\n"; $_ = ; if (/^[45]/) { close S; return -5; } print S "mail from: <$jpg9>\r\n"; $_ = ; if (/^[45]/) { close S; return -5; } print S "rcpt to: <$gac5>\r\n"; $_ = ; if (/^[45]/) { close S; return -6; } print S "data\r\n"; $_ = ; if (/^[45]/) { close S; return -5; } print S "To: $gac5\r\n"; print S "From: $e09k<$jpg9>\r\n"; print S "Reply-to: $e09k<$eplb>\r\n" if $eplb; print S "Subject: $c06p\r\n"; print S "MIME-Version: 1.0\n"; print S "Content-Type: multipart/alternative\;\n boundary=boundary42\n\n"; print S "--boundary42\n"; if (($bk2d) || (!($doea))) { print S "Content-Type: text/plain; charset=\"ISO-8859-1\"\n"; print S "Content-Transfer-Encoding: 8bit\n\n"; $gn8b =~ s/\r//g; print S "$gn8b"; print S "\n\n"; if (!($doea)) { print S "--boundary42--\n"; } else { print S "--boundary42\n"; } } if ($doea) { print S "Content-Type: text/html; charset=\"ISO-8859-1\"\n"; print S "Content-Transfer-Encoding: 8bit\n\n"; $e2pf =~ s/\r//g; print S "$e2pf"; print S "--boundary42--\n"; } print S "\r\n.\r\n"; $_ = ; if (/^[45]/) { close S; return -7; } print S "quit\r\n"; $_ = ; close S; return 1; } sub aab{ if ($c057{'to_lists'} eq choose) { print "Content-type: text/html\n\n"; print "Don't forget to choose a list to send your mailing to!
"; exit; } open (PASSWORD, "$passfile/password.txt"); $agdf = ; close (PASSWORD); chop ($agdf) if ($agdf =~ /\n$/); if ($c057{'password'}) { $h4pj = crypt($c057{'password'}, "aa"); } else { print "Content-type: text/html\n\n"; &ad0; &ac1; print qq— \n
\n \n \n \n \n \n \n
\n


Subscribe\n Me Status:
\n Password Error!

\n \n

Please press your browser's BACK button. Be sure to enter your Administration Password correctly.

\n
\n\n—;&ab9; &aap; exit; } unless ($h4pj eq $agdf) { print "Content-type: text/html\n\n"; &ad0; &ac1; print qq— \n
\n \n \n \n \n \n \n
\n


Subscribe\n Me Status:
\n Password Error!

\n \n

Incorrect Password. Please press your browser's back button and be sure to enter the correct Administration Password.

\n
\n\n—;&ab9; &aap; exit; } if ($c057{'sendto'} eq choose) { print "Content-type: text/html\n\n"; print "Please choose whom you would like to send this mailing to
"; exit; } open (DB, "<$lists/lists.db"); if ($LOCK_EX){ flock(DB, $LOCK_EX); } @f121 = ; close (DB); foreach $ed48(@f121) { @b736 = split(/\|/,$ed48); if ($b736[0] == $c057{'to_lists'}) { $hcmb = $b736[2]; $e09k = $b736[1]; if ($b736[6] eq '0') { $f87k = $ENV{'SERVER_NAME'}; } else { $f87k = $b736[6]; } last; } } if ($c057{'message'}) { $doea = 1; } if ($c057{'message_textonly'}) { $bk2d = 1; } open (SUBJECT, ">$memberinfo/mmailsubject.txt"); if ($LOCK_EX){ flock(SUBJECT, $LOCK_EX); } print SUBJECT "$c057{'mail_subject'}|$c057{'to_lists'}|$hcmb|$f87k|$dj6h|$c057{'unsubscribe_address'}|$c057{'to_lists'}-$ghko-$k89p-$dg3p|$c057{'tracking'}|$c057{'useurl'}|$c057{'html'}|$c057{'no_credit'}|invitation_text-$c057{'to_lists'}-$ghko-$k89p-$dg3p-mm.txt|invitation-$c057{'to_lists'}-$ghko-$k89p-$dg3p-mm.txt|$c057{'sendbatches'}|$c057{'bnumber'}|$c057{'every'}|$e09k|$doea|$bk2d|$c057{'testmailing'}|0\n"; close (SUBJECT); open (MESSAGE, ">$memberinfo/$c057{'to_lists'}-$ghko-$k89p-$dg3p-mm.txt"); if ($LOCK_EX){ flock(MESSAGE, $LOCK_EX); } print MESSAGE "$c057{'message'}"; close (MESSAGE); open (MESSAGE2, ">$memberinfo/$c057{'to_lists'}-$ghko-$k89p-$dg3p-mm-textonly.txt"); if ($LOCK_EX){ flock(MESSAGE2, $LOCK_EX); } print MESSAGE2 "$c057{'message_textonly'}"; close (MESSAGE2); if ($c057{'invitation_text'}) { open (ITEXT, ">$memberinfo/invitation_text-$c057{'to_lists'}-$ghko-$k89p-$dg3p-mm.txt"); if ($LOCK_EX){ flock(ITEXT, $LOCK_EX); } print ITEXT "$c057{'invitation_text'}"; close (ITEXT); } if ($c057{'invitation'}) { open (INVITATION, ">$memberinfo/invitation-$c057{'to_lists'}-$ghko-$k89p-$dg3p-mm.txt"); if ($LOCK_EX){ flock(INVITATION, $LOCK_EX); } print INVITATION "$c057{'invitation'}"; close (INVITATION); } $cgik = "$cgipath/blat_mail.$extension"; $acjk = "perl $cgik"; $b80m = Win32::Spawn ($perlpath, $acjk, $d767) or die "spawn - Perl Path = $perlpath Path to blat_mail.$extension = $acjk : $!"; 1 if $b80m or $d767; if ($c057{'testmailing'}) { &abf($hcmb); exit(0); } else { &ac2; exit; } } 1;