|########################################################################### # # This hack adds: # Elective & Custom Headers & Footers, and # CC: & BCC: Capabilities # # To: Selena Sol's Mailing List Manager, Version: 3.0, # and is probably oportable to more recent versions # # Written and submitted by: # Thomas George # iIDC/San Diego # tgeorge@iidc.org # Jan. 8th 20001 # ########################################################################### # # Adjustents to mail_lib.cgi: # ########################################################################### print MAIL <<__END_OF_MAIL__; To: $touser From: $fromuser cc: $cc bcc: $bcc Subject: $subject sub real_send_mail { local($fromuser, $fromsmtp, $touser, $tosmtp, $ccuser, $ccsmtp, $subject, $messagebody) = @_; sub send_mail { local($from, $to, $cc, $bcc, $subject, $messagebody) = @_; local($fromuser, $fromsmtp, $touser, $tosmtp, $ccuser, $ccsmtp); # # ... # # Actually call the sendmail routine with the # newly generated parameters # &real_send_mail($fromuser, $fromsmtp, $touser, $tosmtp, $ccuser, $ccsmtp, $subject, $messagebody); ########################################################################### # # Adjustments to mailing_list.cgi # ########################################################################### # # # I added: $count = 0; # $cc_count = 0; $bcc_count = 0; # Above this: # # while () # { # # and below this: # # if ($form_data{'list'} ne "demo.setu # { # # I Added: ############################################# # Add(ing) header routine # $email_text = ""; $cc = $form_data{'cc'}; $bcc = $form_data{'bcc'}; if ($email_header ne "" & $form_data{'header'} ne "No") { $email_text .= $email_header; $email_text .= "\n\n"; $email_text .= $form_data{'comments'}; } else { $email_text .= $form_data{'comments'}; } ############################################# # Add(ing) footer routine # if ($email_footer ne "" & $form_data{'footer'} ne "No") { $email_text .= "\n\n"; $email_text .= $email_footer; } ############################################# # Print Successful Email Header: # print "
"; print "From: $email_from
"; print "To: $form_data{'database'}
"; print "Email Subject: $form_data{'subject'}

"; ############################################# # Original: # &send_mail("$email_from","$recipient_email", # "$form_data{'subject'}", # "$form_data{'comments'}"); # ############################################# # Test for CC & BCC Sends # if ($cc_count == 0 & $form_data{'cc'} ne "") {$cc_send = $cc;} else {$cc_send = "";} if ($bcc_count == 0 & $form_data{'bcc'} ne "") {$bcc_send = $bcc;} else {$bcc_send = "";} ############################################# # Added cc: email success verification # if ($cc_count == 0 & $form_data{'cc'} ne "") { print "Mail cc: $cc
"; $cc_count++; } ############################################# # Added bcc: email success verification # if ($bcc_count == 0 & $form_data{'bcc'} ne "") { print "Mail bcc: $bcc
"; $bcc_count++; } $count++; ########################################################################### # # Adjustments to default.setup.cgi # ########################################################################### #$default_cc = "cc\@iidc.org"; # For debugging #$default_bcc = "bcc\@iidc.org"; # For debugging / normal use $default_cc = ""; # For normal use $default_bcc = ""; # For normal use $email_header = "Add Your Header Here\n\n"; $email_footer = "Add Your Footer Here\n\n"; # # sub admin_form # # { # # print qq~ List Server Admin Page

List:
cc: seperate multiple recipients with commas
bcc: seperate multiple recipients with commas
Header: Yes No
Footer: Yes No
Subject:
Email:
~;