Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Email Forwarding

by aitap (Deacon)
on Feb 05, 2013 at 18:24 UTC ( #1017244=note: print w/replies, xml ) Need Help??


in reply to Email Forwarding

Where do you want to get the message from, system mailbox? Try reading /var/mail/$username (and parsing it with help from some MIME-parsing/creating module, like Email::MIME or MIME::Tools).
Sorry if my advice was wrong.

Replies are listed 'Best First'.
Re^2: Email Forwarding
by Anonymous Monk on Feb 05, 2013 at 18:32 UTC

    The email would come from "replaceme@thedomain.com" w/ Subject: "this is the subject to replace" Which "replaceme" is in the Aliase file as: replaceme: "|/msg/forward.pl" When an email is received, the perl script is ran, but I need it to include the Message that is sent.

      Then use one of the modules specified to read and parse the text going from STDIN. You can read from STDIN filehandle using diamond operator (<>), like this:  my $whole_message = do { local $/; <STDIN> }; (see also $/ for more information on slurping filehandle contents).
      Sorry if my advice was wrong.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1017244]
help
Chatterbox?
[LanX]: quick survey ... Module::Build, ExtUtils:: ModuleMaker or Module::Starter ?
[Your Mother]: Module::Install
[Your Mother]: :P
[LanX]: Moma knows best! ;-)
[Your Mother]: I am quite aware that Module::Build is MUCH more in favor with many monks but I had trouble with it every time I tried to use it and trouble with CPAN stuff that used it too.
[Your Mother]: Take my advice with a grain of salt. I haven't done a new CPAN release in years at this point.
[LanX]: I want to author a new module for CPAN w/o complicated build structure
[LanX]: ther is also Dist::Zilla :-/
[LanX]: How to make a CPAN Module Distribution from 2002

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2017-08-18 17:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (306 votes). Check out past polls.

    Notices?