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

Re: [cobalt-users] raq3 email fowarding and changing info



Steve,

Thanks for the reference, I have played around with STDIN in perl, and gotten it to extract the header info- but cant seem to get the body to forward on. I also need to include attachments.

David

while (<STDIN>) {
 last if /^$/;
 if (/^(?:To):\s+(.*)/) {
		$to = $1;
}
	    if (/^(?:From|Reply-To):\s+(.*)/) {
		$sender = $1;
	} elsif (/^Subject:\s+\[\s*(.*)\s*\]\s*(.*)/) {
		$subject = $2;
	    }
 if (/^(?:Subject):\s+(.*)/) {
		$subject = $1;
}
### sure this isnt it, but had to try
 if (/^(?:Body):\s+(.*)/) {
		$body = $1;
}
}



Anyone know how to pass the header message body and attachments to the
script?
Or, is it already being passed, so I just need the script to extract it?

The entire message (including headers) is already being passed. You need to
access STDIN.  You didn't say if you're using Perl or another language, but
if you search for "perl stdin" on google.com I bet you'd find the syntax for
accessing STDIN for it in a minute or so.  If you're using PHP email me
off-list and I'll help you out.

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/


_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.