# FILE: src-board-subs-msm
#-------------------------------------------------------------------------------
# DISCUS VERSION 3.10 COPYRIGHT NOTICE
#
# Discus 3.10 is copyright (c) 2000 by DiscusWare, LLC, all rights reserved.
# The use of Discus is governed by the Discus License Agreement which is
# available from the Discus WWW site at:
#    http://www.discusware.com/discus/license
#
# Pursuant to the Discus License Agreement, this copyright notice may not be
# removed or altered in any way.
#-------------------------------------------------------------------------------

sub mail_sendmail_send {
	my ($to, $bcc, $input, $debug, $subjectline, $replyto) = @_;
	use Mail::Sendmail;
	my (%mail, $dataX, $fr);
	$fr = $email{fromname};
	$fr .= " <$email{fromaddr}>" if $email{fromaddr};
	$dataX = "Discus $release_version";
	$dataX .= ".$free_revision" if !$pro;
	$dataX .= ".$pro_revision Pro" if $pro;
	$dataX .= " <$html_url>\n";
	$to = "" if $bcc;
	$replyto = $fr if $replyto eq "";
	%mail = (
		To => $to,
		From => $fr,
		Bcc => $bcc,
		'X-Mailer' => $dataX,
		Smtp => $email{"SMTP2"},
		Message => $input,
		'Reply-to' => $replyto,
		'Subject' => $subjectline,
	);
	$status = sendmail %mail;
	if ($status) {
		return 1;
	} elsif ($debug) {
		&error_message($Mail::Sendmail::error, $Mail::Sendmail::log, 0, 1);
	} else {
		$err = $Mail::Sendmail::error; $err2 = $Mail::Sendmail::log;
		$err =~ s/\n/ /g; $err2 =~ s/\n/ /g;
		&log_error("src-board-subs-msm", "mail_sendmail_send", "$err: $err2");
		return 0;
	}
}

1;


# END - FILE IS CORRECTLY UPLOADED #
