Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: does MIME::Lite or Net::SMTP provide forward mail function ..... ANY OTHER OPTIONS ??

by BlueLines (Hermit)
on Mar 11, 2001 at 17:46 UTC ( [id://63610]=note: print w/replies, xml ) Need Help??


in reply to does MIME::Lite or Net::SMTP provide forward mail function ..... ANY OTHER OPTIONS ??

Corion is right. Your question is very unclear. I guess asking for a perl module/script to do mail forwarding is the equivalent of asking for a perl module to change a lightbulb. It could be done, but there exist easier ways. In most mail servers that run in a UNIX environment, simply having a file named ".forward" in your home directory would forward any mail to the contents of the file if they were an email address, or to a shell process that you could specify via |. I doubt there's something similar to this in the Win32 environment, but setting up mail forwarding on an Outlook server seems like it should be very trivial. So writing a script seems to be kind of pointless (in my opinion).

But, assuming you really want to forward mail, you'd need to do the following:

  • Check to see if your account has gotten mail. You can telnet to the imap/pop port if you don't have the correct perl modules installed to talk.
  • Download any mail that you have recieved.
  • Scan the mail to make sure it's for you (and to block out anything you might not want forwarded).
  • Open up SMTP connection to some server, using the previously fetched email as the body of the message
  • Done. Now loop again. Endlessly.
So as you can see, this is alot more work than it's worth. I agree that there's always more than one way to do things, but just because there's a harder way doesn't mean you have to take it.

BlueLines

Disclaimer: This post may contain inaccurate information, be habit forming, cause atomic warfare between peaceful countries, speed up male pattern baldness, interfere with your cable reception, exile you from certain third world countries, ruin your marriage, and generally spoil your day. No batteries included, no strings attached, your mileage may vary.
  • Comment on Re: does MIME::Lite or Net::SMTP provide forward mail function ..... ANY OTHER OPTIONS ??

Replies are listed 'Best First'.
Re: Re: does MIME::Lite or Net::SMTP provide forward mail function ..... ANY OTHER OPTIONS ??
by Ah CHU (Initiate) on Mar 11, 2001 at 21:31 UTC
    THX MATE ... um ... now i can get my mail ... and then i want to forward my mail to others ... so i try to collect the message of my mail ... however ... i odn't know how to filter my mail's headers to get the message body only ... could you teach me how to do so?
Re: Re: does MIME::Lite or Net::SMTP provide forward mail function ..... ANY OTHER OPTIONS ??
by Ah CHU (Initiate) on Mar 11, 2001 at 21:31 UTC
    THX MATE ... um ... now i can get my mail ... and then i want to forward my mail to others ... so i try to collect the message of my mail ... however ... i don't know how to filter my mail's headers so as to get the message body only ... could you teach me how to do so?
      Mail::Header for headers
      The message body depends on plain text\mime. If plain, then you can do it with no modules v. easily if you know what an email message looks like.

      $ perldoc perldoc

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://63610]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-18 13:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found