Look for a perl module here

http://jenda.krynicky.cz/#Mail::Sender

Sends via socket connection... Very Nice

-----Original Message-----
From: Moonlit Submit [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 3:54 AM
To: [EMAIL PROTECTED]
Subject: Aacckk!


Hi,
I need the following subroutine to NOT use sendmail -t.
How the heck do I do that> I paid a gazillion dollars to have this script
made and it is hogging resources...aacckkkk!
Lisa
####################################
sub dosend{
print $q->header;
&checklogin;
&getdate;
&header;
if ($banner eq "yes") {&banner1;}
if($subject eq ""){print qq|<center><b><font  face="$base_font"
color="$txtcolor">You forgot to enter a subject! try
again...</font></b></center>|;exit;}
if($message eq ""){print qq|<center><b><font  face="$base_font"
color="$txtcolor">You forgot to enter a message! try
again...</font></b></center>|;exit;}

$length=length($message);
if ($length > 2500){
print qq|
<center>
<font face="$base_font" size="3" color=$txtcolor><b>
Your message is too large!  Maximum message length is 2500 bytes. Your
message is $length bytes long. Please shorten it, and try again.</b>
</font>
<br></center>|;
exit;}
#badword check
#open (BFILE, "$cgiroot/data/badwords.txt");
#flock (BFILE, 2);
#@BADLINES=(<BFILE>);
#flock (BFILE, 8);
#close(BFILE);


#@subj = split(/ /, $subject);
#@mess = split(/ /, $message);

#foreach $badword(@BADLINES) {
#chop ($badword);
#foreach $subjword(@subj) {
# if ($badword =~ /\b$subjword\b/i)  { &badwords; }
# }
#foreach $messword(@mess) {
# if ($badword =~ /\b$messword\b/i)  { &badwords; }
# }
# }
#end badword check
if($lastsend eq "$date"){
print qq|
<center>
<font face="$base_font" size="3" color=$txtcolor><b>
You cannot send a message right now!</b>
</font>
<br>
<font  face="$base_font" color="$txtcolor">You will have to wait at least 24
hours before you can send again.</font>
<br>
<br>
<a
href="$htmldir/members.cgi?action=main&username=$username&password=$password
"
style="color:$lnkcolor;">click here to continue</a>
</center>
<br>
|;
exit;
}
if ($status =~ /vacation/i){
print qq|
<center>
<font  face="$base_font" size=5 color=$txtcolor><b>
You cannot send a message right now!</b>
</font>
<br>
<font  face="$base_font" color="$txtcolor">Your account is in Vacation
status.</font>
<br>
<br>
<a
href="$htmldir/members.cgi?action=main&username=$username&password=$password
"
style="color:$lnkcolor;">click here to continue</a>|;
exit;
}
if($code ne ""){
print qq|
<center>
<font  face="$base_font" size=5 color=$txtcolor><b>
You cannot send a message right now!</b>
</font>
<br>
<font  face="$base_font" color="$txtcolor">You have not validated your
subscription email address yet.</font>
<br>
<br>
<a
href="$htmldir/members.cgi?action=main&username=$username&password=$password
"
style="color:$lnkcolor;">click here to continue</a> \|
<a
href="$htmldir/members.cgi?action=resendcode&username=$username&password=$pa
ssword"
style="color:$lnkcolor;">resend validation code</a>
</center>
<br>
|;
}else{

print qq|
<center>
<font  face="$base_font" size=5 color=$txtcolor><b>Your Email Has Been Que'd
For Delivery!</font></small><br>
<small><font  face="$base_font" color="red">You Are Free to Leave, Have a
Great & Profitable Day!</font></small><br>
<br>
<a
href="$htmldir/members.cgi?action=main&username=$username&password=$password
"
style="color:$lnkcolor;">click here to continue</a><br>
</center>
<br>
<br>
|;


open (LSEND, "$cgiroot/data/lsend/addys.txt");
flock(LSEND, 2);
(@lines) = (<LSEND>);
flock(LSEND, 8);
close (LSEND);

foreach $line (@lines){
($mlist,$mname,$muser,$mpass) = split (/\|/, $line);

#print qq|\n|;

open(MAIL,"|$sendmail -t");
print MAIL "Return-path: <$adress>\n";
print MAIL "From: ($sub/$listname)\n";
print MAIL "To: $mlist\n";
print MAIL "Reply-To: $sub ($first)\n";
print MAIL "Subject: $subject\n\n";

print MAIL "$top_note\n";
print MAIL
"------------------------------------------------------------------------\n\
n";
print MAIL "$message\n\n";
print MAIL
"------------------------------------------------------------------------\n"
;
print MAIL "$bot_note\n";
close (MAIL);
}

unlink "$cgiroot/data/members/$username.txt";

open (MFILE, ">$cgiroot/data/members/$username.txt");
flock(MFILE, 2);
print MFILE
"$password|$first|$last|$email|$sub|$joined|$date|$code|$confirm|$status|$ex
tra2|$extra3|\n";
flock(MFILE, 8);
close (MFILE);

unlink "$cgiroot/data/lsend/$username.txt";

open (NFILE, ">$cgiroot/data/lsend/$username.txt");
flock(NFILE, 2);
print NFILE "$subject\n\n$message\n";
flock(NFILE, 8);
close (NFILE);
}
&footer;
exit;
}
####################################


_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to