[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cobalt-developers] PERL / Sendmail interaction on RAQ3



Looks ok to me, heres a snip from a subrountine that runs on a RaQ3/4 it
appears to be almost the same as yours but with a view extra error checks

#===================================================================#

sub  SendEmailResponse
{
	my($to,$from,$subject,$body) = @_;

	if ($0 =~ /\\/)
	{
		return 1; # return 1 when testing on Windows
	}

	if($from eq "")
	{
		if($EmailAddress eq ""){$from = $to}
		else{$from = $EmailAddress;}
	}
	$mailprog .= " -t" if($mailprog !~ /-t/);
	open(MAIL, "| $mailprog") || &show_error("$mailprog:  Can't open mailprog
because ($!)."); #show_error is a subrountine
	print MAIL "To: $to\n";
	print MAIL "From: $from\n";
	print MAIL "Subject: $subject\n\n";
	print MAIL "$body\n";
	print MAIL  ".\n";
	close MAIL;
	return 1;

}
#===========================================================================
============#
_

-----Original Message-----
From: cobalt-developers-admin@xxxxxxxxxxxxxxx
[mailto:cobalt-developers-admin@xxxxxxxxxxxxxxx]On Behalf Of pulse-wave
Sent: 17 May 2001 05:06
To: cobalt-developers@xxxxxxxxxxxxxxx
Subject: [cobalt-developers] PERL / Sendmail interaction on RAQ3


on a freeBSD server i use the following code to send an email using perl


open (SENDMAIL, "|$SENDMAIL_PATH $TO") || die "Can't open $SENDMAIL!\n";
print SENDMAIL "From: $REPLYTO ($REPLYTO)\n";
print SENDMAIL "Reply-To: $REPLYTO ($REPLYTO)\n";
print SENDMAIL "To: $TO]\n";
print SENDMAIL "Subject: $SUBJECT\n\n";
print SENDMAIL "content\n";
close(SENDMAIL);

When trying this on the RAQ3 i get strange errors.
Does anyone know if there is a different syntax for interacting with
sendmail on the RAQ3 or if there is a better way entirely

many thanks
g a r e t h

_______________________________________________
cobalt-developers mailing list
cobalt-developers@xxxxxxxxxxxxxxx
http://list.cobalt.com/mailman/listinfo/cobalt-developers