spreq
asked on
Get the e-mail header
Im trying to understand/write email forwarder. When incoming email arrive, im feeding it to program a.cgi where it will get the sender, title and body and put in database. Later i can forward it to appropriate person.
My question is: how can i get the variable sender/title/body without depending on other module???
Thank in advance.
My question is: how can i get the variable sender/title/body without depending on other module???
Thank in advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://search.cpan.org/~markov/MailTools-1.67/Mail/Header.pm
just use regular expression to get the important strings from the mail
ASKER
To jmcg:
This email is just like ordinary email, and for one particular account (eg: mrX) i want to 'feed to program' named a.cgi. (the term used by webmin). Notice that this doesnt involve any html form... Thats it, no need for auto reply.
This program then will parse, extract all info and put to the db. My concern is just how to get the data in easier way (not using hevyweight program and module, if any).
To ozo:
I spent all morning to look for the suitable prgram, and also tried the mail::simple. (of course with all the prerequisite). Also read from http://www.perl.com/pub/a/2004/06/10/email.html
I got problem installing the module:
"Can't locate Email/Simple.pm in @INC (@INC contains: /usr/perl5/5.00503/sun4-so l
aris /usr/perl5/5.00503 /usr/perl5/site_perl/5.005 /sun4-sola ris /usr/perl5/site_
perl/5.005 .) at a.cgi line 2." although i already did make..makeinstall ...
Just back from lunch, i will try again install the module..
but i really appreciate if any of you could provide non-module-dependant solution.
my humble thank you for both of you...
This email is just like ordinary email, and for one particular account (eg: mrX) i want to 'feed to program' named a.cgi. (the term used by webmin). Notice that this doesnt involve any html form... Thats it, no need for auto reply.
This program then will parse, extract all info and put to the db. My concern is just how to get the data in easier way (not using hevyweight program and module, if any).
To ozo:
I spent all morning to look for the suitable prgram, and also tried the mail::simple. (of course with all the prerequisite). Also read from http://www.perl.com/pub/a/2004/06/10/email.html
I got problem installing the module:
"Can't locate Email/Simple.pm in @INC (@INC contains: /usr/perl5/5.00503/sun4-so
aris /usr/perl5/5.00503 /usr/perl5/site_perl/5.005
perl/5.005 .) at a.cgi line 2." although i already did make..makeinstall ...
Just back from lunch, i will try again install the module..
but i really appreciate if any of you could provide non-module-dependant solution.
my humble thank you for both of you...
ASKER
that what im trying to do Talmash.. :-)
the problem is just, to create that variable...
is there any variable that contain/convert all incoming email?
i think i can get the data using reg exp as you suggested..
thanks
the problem is just, to create that variable...
is there any variable that contain/convert all incoming email?
i think i can get the data using reg exp as you suggested..
thanks
So is this program a cgi script? It sounds like it's not.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.