Pegasus Mail & Mercury

Welcome to the Community for Pegasus Mail and
The Mercury Mail Transport System, the Internet's longest-serving PC e-mail system!
Welcome to Pegasus Mail & Mercury Sign in | Join | Help
in
Home Blogs Forums Downloads Pegasus Mail Overview Mercury Overview Wiki

Pass values from email to external program....

Last post 05-09-2010, 22:10 by tomt. 5 replies.
Sort Posts: Previous Next
  •  05-06-2010, 19:17

    • tomt is not online. Last active: 11-29-2012, 9:54 tomt
    • Top 25 Contributor
    • Joined on 05-08-2007
    • UK
    • Contributor
    • Points 3,650

    Pass values from email to external program....

    I know Mercury can run an external program.

    EG: I have logmein installed but disabled.
    I email a specific account, with a specific key work in the subject and logmein is then enabled.
    I can also disable by specifing a different keyword in the subject.

    This all works well.  BUT could I pass a value/string from the subject to an external program ?

    Ideally with out the use a daemon, as I've no idea how to write one !!

    Thanks


    www.medionsupport.com
  •  05-06-2010, 19:50

    • Rolf Lindby is not online. Last active: 2019-08-25, 14:52 Rolf Lindby
    • Top 10 Contributor
    • Joined on 05-08-2007
    • Stockholm, Sweden
    • SuperStar
    • Points 26,310
    • BetaTeam Moderator SystemAdministrator

    Re: Pass values from email to external program....

    Filtering rules don't have access to the message, they can only specify conditions and perform an action if those conditions are met. To use a header or some other part of the message in an external program you will need either a policy or a daemon, I'm afraid.

    /Rolf

  •  05-07-2010, 0:27

    Re: Pass values from email to external program....

    > I email a specific account, with a specific key work in the subject and logmein is then enabled.
    >
    > I can also disable by specifing a different keyword in the subject.
    >
    > This all works well.  BUT could I pass a value/string from the subject to an external program ?

    A policy gets the RFC 2822 message body and the program you use with a policy can do whatever it wants to the text in the RFC 2822 message as long as it's still a valid message when it's passed back to Mercury.
    Thomas R. Stephenson
    San Jose, California
    Member of Pegasus Mail Support Team

    I do not answer private messages from the forum. If you want to contact me use email to techsupp@tstephenson.com.
  •  05-07-2010, 14:44

    • tomt is not online. Last active: 11-29-2012, 9:54 tomt
    • Top 25 Contributor
    • Joined on 05-08-2007
    • UK
    • Contributor
    • Points 3,650

    Re: Pass values from email to external program....

    Thanks for the replies.

    I've decided to look at PHP to see if I can read the mail from the mailbox and capture the data that way !

     


    www.medionsupport.com
  •  05-07-2010, 23:25

    Re: Pass values from email to external program....

    You could use a filter rule to copy the mail to a directory and either have your script monitoring it for new files or use a second rule to trigger the script.

    The script could then extract the data and delete the file.

  •  05-09-2010, 22:10

    • tomt is not online. Last active: 11-29-2012, 9:54 tomt
    • Top 25 Contributor
    • Joined on 05-08-2007
    • UK
    • Contributor
    • Points 3,650

    Re: Pass values from email to external program....

    Thanks for the replies.

     I'll look into using a filtering rule. :)

    You could use a filter rule to copy the mail to a directory and either have your script monitoring it for new files or use a second rule to trigger the script.


    www.medionsupport.com
View as RSS news feed in XML

Contact | Advertise | Host provider: PraktIT | Terms of Use | Privacy Statement
Copyright © 2007-2011 David Harris / Peter Strömblad. | Pegasus Mail Home Page