Gossamer Forum
Home : General : Perl Programming :

Piping an email...

Quote Reply
Piping an email...
Has anyone had much experience with this? At the moment, I'm using this, as an email forwarder;

| /usr/bin/perl /home/ace-ins/public_html/dev2/pipe.pl

I've also tried;

| /home/ace-ins/public_html/dev2/pipe.pl

| perl /home/ace-ins/public_html/dev2/pipe.pl


I just keep getting this error;

pipe to |/usr/bin/perl/home/ace-ins/public_html/dev2/pipe.pl
generated by testpipe@ace-installer.com
Child process of virtual_address_pipe transport returned 69 (could mean service or program unavailable) from command:
/usr/bin/perl/home/ace-ins/public_html/dev2/pipe.pl

This is the code I'm currently using...it just seems to hang from SSH;

Code:
@email_in = <STDIN>;

foreach (@email_in) { $data .= $_; }

$sendmail = "/usr/sbin/sendmail";
$email = "webmaster@ace-installer.com";
$subject = "Email grabbed...";

open(MAIL, "|$sendmail -t -i") || die &error;
print MAIL "To: $recipient \n";
print MAIL "From: $email \n";
print MAIL "Reply-to: $email \n";
print MAIL "Subject: $subject \n\n";
print MAIL "Data: $data\n";
print MAIL "$send\n";
print MAIL "\n";
close(MAIL);

Anyone got any ideas? As I say, this is the first time I have played with piping from an email, so I'm pretty clueless on it all Frown

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Subject Author Views Date
Thread Piping an email... Andy 6335 Mar 19, 2003, 7:27 AM
Thread Re: [Andy] Piping an email...
Paul 6199 Mar 19, 2003, 8:05 AM
Post Re: [Paul] Piping an email...
Andy 6145 Mar 19, 2003, 8:11 AM
Thread Re: [Andy] Piping an email...
Alex 6173 Mar 19, 2003, 12:03 PM
Thread Re: [Alex] Piping an email...
Andy 6095 Mar 21, 2003, 7:57 AM
Thread Re: [Andy] Piping an email...
Paul 6144 Mar 21, 2003, 8:46 AM
Thread Re: [Paul] Piping an email...
Andy 6120 Mar 21, 2003, 9:02 AM
Post Re: [Andy] Piping an email...
Andy 6125 Mar 21, 2003, 9:08 AM
Post Re: [Andy] Piping an email...
Paul 6045 Mar 21, 2003, 9:52 AM