Note that in theory you could eliminate all bbut the middle clause to the if/elsif/else statement, but i wanted to keep the original functionality of being able to send directly to sendmail rather than simulate it through the send_mail function.
Note the following patch may (probably does) suffer from word-wrap:
--- email_raw.tag.orig Wed May 5 06:53:36 2004
+++ email_raw.tag Fri Apr 29 15:33:57 2005
@@ -30,12 +30,25 @@
$body =~ s/^\s+//;
SEND: {
- open(Vend::MAIL,"|$Vend::Cfg->{SendMailProgram} -t") or last SEND;
- print Vend::MAIL $body
- or last SEND;
- close Vend::MAIL
- or last SEND;
- $ok = ($? == 0);
+ my $using = $Vend::Cfg->{SendMailProgram};
+
+ if (lc $using eq 'none') {
+ $ok = 1;
+ last SEND;
+ } elsif (lc $using eq 'net::smtp') {
+ $body =~ s/^(.+?)(?:\r?\n){2}//s;
+ my $headers = $1;
+ last SEND unless $headers;
+ my @head = split(/\r?\n/,$headers);
+ $ok = send_mail(suppressed,$body);
+ } else {
+ open(Vend::MAIL,"|$using -t") or last SEND;
+ print Vend::MAIL $body
+ or last SEND;
+ close Vend::MAIL
+ or last SEND;
+ $ok = ($? == 0);
+ }
}
if (!$ok) {
_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.