Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How do I forward an email using PERL?

How do I forward an email using PERL?

How do I forward an email using PERL?


 I would like to "FORWARD" or "DELETE" or "REPLY" to an email using Perl. For my case, let us assume the email to be saved in a text file. So how do I proceed with replying or deleting or forwarding. It will be of great help, if you help me.

RE: How do I forward an email using PERL?

Read FAQ219-364 to learn how to send email.  In order to reply, you'll have to open the text file and parse the contents of the FROM: field and put that address in the TO: field of your new email.  The body of the email remains the same.  You could do a "foreach $line" through the body and put a > in front of it if you wanted.  There are lots of threads in this forum about how to open a file and parse the contents.  Do a search.  Some of them are just a few threads away.

Tom Anderson
CEO, Order amid Chaos, Inc.

RE: How do I forward an email using PERL?

If you have a PERL script already started, please post the code you are haveing trouble with so all of us can look at it and help with the code. I also suggest looking through some of the threads here. You will find they are very informative and answer most of your questions without having to post a new thread. Your code is most helpful is solving your specific problems.:)

RE: How do I forward an email using PERL?

Hi Mr.Tanderso and Mr.Haunter,

 I am very new to Perl Language. I tried with sendmail in UNIX. Then I could send mails. But I couldn't find the Sendmail.pm or Mail.pm Modules in Perl.I have seen some codes to forward mails containing Sendmail.pm which fails to compile giving the error message as could not find Mail.pm. Could suggest me some way of doing the forwarding,replying and deleting without using the same.Because I couldn't parse the header and get the contents.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close