OT ? eMail as a trigger ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Hanjo Grüßner

    #1

    OT ? eMail as a trigger ?

    Hello,

    I'm not shure wether it's OT or not.

    I want to use an eMail as a trigger to start a program.

    E.g. an eMail-Group: any group-member sends an eMail to a group-e-adress
    an the Mail is dispatches automatically to all members.

    I know there are services like yahougroups who do exactly this, but I
    wonder wether it's possible to do something like this by my own.

    Further purposes could be to trigger any program on a webserver by a
    special trigger-eMail.

    Any hints ?

    TIA

    Hanjo

    --
    Software & Seminar-Kontor Hans-Joachim Grüßner
    Glasholz
    D-24369 Waabs
    The premium domain gruessner.de is for sale on fruits.co. Secure the domain now and start your online success story. Safe payment and quick transfer are guaranteed.

  • Peter Chant

    #2
    Re: OT ? eMail as a trigger ?

    Hanjo Grüßner wrote:
    [color=blue]
    > Hello,
    >
    > I'm not shure wether it's OT or not.[/color]

    Possibly as you don't need php.
    [color=blue]
    >
    > I want to use an eMail as a trigger to start a program.[/color]

    Are you running linux/unix/bsd?
    [color=blue]
    >
    > E.g. an eMail-Group: any group-member sends an eMail to a group-e-adress
    > an the Mail is dispatches automatically to all members.
    >[/color]

    If you said yes above and are running sendmail look up aliases.

    You can create simple mailing lists or feed the email into a script /
    program.



    --

    Comment

    • Manuel Lemos

      #3
      Re: OT ? eMail as a trigger ?

      Hello,

      on 06/12/2005 08:22 AM Hanjo Grüßner said the following:[color=blue]
      > I want to use an eMail as a trigger to start a program.
      >
      > E.g. an eMail-Group: any group-member sends an eMail to a
      > group-e-adress an the Mail is dispatches automatically to all members.
      >
      > I know there are services like yahougroups who do exactly this, but I
      > wonder wether it's possible to do something like this by my own.
      >
      > Further purposes could be to trigger any program on a webserver by a
      > special trigger-eMail.[/color]

      That is easy. I do that all the time. Basically you need to assign a
      certain address to a mailbox reachable by POP3. Then you keep polling
      the mailbox periodically until a new message reaches there to be
      redistributed to your mailing list.

      You may want to use this POP3 class for fetching your messages.

      http://www.phpclasses.org/pop3class


      --

      Regards,
      Manuel Lemos

      PHP Classes - Free ready to use OOP components written in PHP
      http://www.phpclasses.org/

      PHP Reviews - Reviews of PHP books and other products
      http://www.phpclasses.org/reviews/

      Metastorage - Data object relational mapping layer generator

      Comment

      • Hanjo Grüßner

        #4
        Re: OT ? eMail as a trigger ?

        Am Sun, 12 Jun 2005 15:40:50 +0200 schrieb Peter Chant
        <pete@petezilla .co.uk>:
        [color=blue]
        > Hanjo Grüßner wrote:
        >[color=green]
        >> Hello,
        >>
        >> I'm not shure wether it's OT or not.[/color]
        >
        > Possibly as you don't need php.
        >
        > Are you running linux/unix/bsd?[/color]

        Hello,

        AFAIK my 'hired' webserver runs on Linux. So I will have to ask my
        provider, I think.

        Greetings

        Hanjo



        --
        Software & Seminar-Kontor Hans-Joachim Grüßner
        Glasholz
        D-24369 Waabs
        The premium domain gruessner.de is for sale on fruits.co. Secure the domain now and start your online success story. Safe payment and quick transfer are guaranteed.

        Comment

        • Hanjo Grüßner

          #5
          Re: OT ? eMail as a trigger ?

          Am Sun, 12 Jun 2005 23:37:16 +0200 schrieb Manuel Lemos <mlemos@acm.org >:
          [color=blue]
          > Hello,
          >[/color]
          [color=blue]
          > That is easy. I do that all the time. Basically you need to assign a
          > certain address to a mailbox reachable by POP3. Then you keep polling
          > the mailbox periodically until a new message reaches there to be
          > redistributed to your mailing list.[/color]

          Thanks, that could be a method.

          (Even if I wanted my server to that automatically)

          I will try that.

          Greetings

          Hanjo




          --
          Software & Seminar-Kontor Hans-Joachim Grüßner
          Glasholz
          D-24369 Waabs
          The premium domain gruessner.de is for sale on fruits.co. Secure the domain now and start your online success story. Safe payment and quick transfer are guaranteed.

          Comment

          • Colin McKinnon

            #6
            Re: OT ? eMail as a trigger ?

            Peter Chant wrote:
            [color=blue]
            > Hanjo Grüßner wrote:[color=green]
            >> I want to use an eMail as a trigger to start a program.[/color]
            >
            > Are you running linux/unix/bsd?
            >[color=green]
            >>[/color]
            >
            > If you said yes above and are running sendmail look up aliases.
            >
            > You can create simple mailing lists or feed the email into a script /
            > program.
            >[/color]

            May require root access and can be dangerous if not done right.

            I use procmail to invoke my PHP scripts from the mail feed.

            C.

            Comment

            • Hanjo Grüßner

              #7
              Re: OT ? eMail as a trigger ?

              Am Sun, 12 Jun 2005 23:37:16 +0200 schrieb Manuel Lemos <mlemos@acm.org >:
              [color=blue]
              >
              > That is easy. I do that all the time. Basically you need to assign a
              > certain address to a mailbox reachable by POP3. Then you keep polling
              > the mailbox periodically until a new message reaches there to be
              > redistributed to your mailing list.[/color]

              Hello Manuel,

              and thanks. Your classes are running very well and are fine documented.

              But, sorry, how do I poll ?

              Greetings from the sunny shores of the baltic sea ;-)

              Hanjo

              --
              Software & Seminar-Kontor Hans-Joachim Grüßner
              Glasholz
              D-24369 Waabs
              The premium domain gruessner.de is for sale on fruits.co. Secure the domain now and start your online success story. Safe payment and quick transfer are guaranteed.

              Comment

              • Chuck Anderson

                #8
                Re: eMail as a trigger ?

                Manuel Lemos wrote:
                [color=blue]
                >Hello,
                >
                >on 06/12/2005 08:22 AM Hanjo Grüßner said the following:
                >
                >[color=green]
                >>I want to use an eMail as a trigger to start a program.
                >>
                >>E.g. an eMail-Group: any group-member sends an eMail to a
                >>group-e-adress an the Mail is dispatches automatically to all members.
                >>
                >>I know there are services like yahougroups who do exactly this, but I
                >>wonder wether it's possible to do something like this by my own.
                >>
                >>Further purposes could be to trigger any program on a webserver by a
                >>special trigger-eMail.
                >>
                >>[/color]
                >
                >That is easy. I do that all the time. Basically you need to assign a
                >certain address to a mailbox reachable by POP3. Then you keep polling
                >the mailbox periodically until a new message reaches there to be
                >redistribute d to your mailing list.
                >
                >You may want to use this POP3 class for fetching your messages.
                >
                >http://www.phpclasses.org/pop3class
                >[/color]
                Thanks for this. I've been playing with it for a couple of hours. I've
                always wanted to automatically verify new users to a mail list I
                created. I'm sure you know what I mean. When they sign up I send an
                automated email which they must respond to (leaving the subject
                intact). This is going to work great (using cron to poll).

                Have you any clever method for pulling lines out of the headers array?
                Using explode at the :'s will not work because of the Date line (time
                contains :'s), so I do this:
                (just curious to know if there is a simpler way to do it)

                for ($i=0; $i<count($heade rs); $i++)
                {
                // find first colon in the header line
                $breakpos = strpos($headers[$i], ':');

                // header field = substring from 0th character to breakpos
                $field = substr($headers[$i], 0, $breakchar);

                // set field = substring from breakpos to end of string
                switch ($field)
                {
                case 'Date':
                $date = substr($headers[$i], $breakpos);
                break;
                case 'From':
                $from = substr($headers[$i], $breakpos);
                break;
                case 'To':
                $to = substr($headers[$i], $breakpos);
                break;
                case 'Subject':
                $subject = substr($headers[$i], $breakpos);
                break;
                }
                }

                I'm not going to bother with the "Received" fields.

                Thanks, Manuel. You have lots of class ô¿Ô¬

                --
                *************** **************
                Chuck Anderson • Boulder, CO

                Integrity is obvious.
                The lack of it is common.
                *************** **************

                Comment

                • Manuel Lemos

                  #9
                  Re: eMail as a trigger ?

                  Hello,

                  on 06/13/2005 05:43 PM Chuck Anderson said the following:[color=blue][color=green][color=darkred]
                  >>> I want to use an eMail as a trigger to start a program.
                  >>>
                  >>> E.g. an eMail-Group: any group-member sends an eMail to a
                  >>> group-e-adress an the Mail is dispatches automatically to all members.
                  >>>
                  >>> I know there are services like yahougroups who do exactly this, but
                  >>> I wonder wether it's possible to do something like this by my own.
                  >>>
                  >>> Further purposes could be to trigger any program on a webserver by a
                  >>> special trigger-eMail.
                  >>>[/color]
                  >>
                  >> That is easy. I do that all the time. Basically you need to assign a
                  >> certain address to a mailbox reachable by POP3. Then you keep polling
                  >> the mailbox periodically until a new message reaches there to be
                  >> redistributed to your mailing list.
                  >>
                  >> You may want to use this POP3 class for fetching your messages.
                  >>
                  >> http://www.phpclasses.org/pop3class
                  >>[/color]
                  > Thanks for this. I've been playing with it for a couple of hours. I've
                  > always wanted to automatically verify new users to a mail list I
                  > created. I'm sure you know what I mean. When they sign up I send an
                  > automated email which they must respond to (leaving the subject
                  > intact). This is going to work great (using cron to poll).
                  >
                  > Have you any clever method for pulling lines out of the headers array?
                  > Using explode at the :'s will not work because of the Date line (time
                  > contains :'s), so I do this:
                  > (just curious to know if there is a simpler way to do it)[/color]


                  Sure, strtok($line,": "); to pick the header name, and then strtok("");
                  to pick the header value . Just keep in mind that header line that start
                  with space or tab are continuation of previous header line value.



                  --

                  Regards,
                  Manuel Lemos

                  PHP Classes - Free ready to use OOP components written in PHP
                  http://www.phpclasses.org/

                  PHP Reviews - Reviews of PHP books and other products
                  http://www.phpclasses.org/reviews/

                  Metastorage - Data object relational mapping layer generator

                  Comment

                  • Chuck Anderson

                    #10
                    Re: eMail as a trigger ?

                    Manuel Lemos wrote:
                    [color=blue]
                    >Hello,
                    >
                    >on 06/13/2005 05:43 PM Chuck Anderson said the following:
                    >
                    >[color=green][color=darkred]
                    >>>>I want to use an eMail as a trigger to start a program.
                    >>>>
                    >>>>E.g. an eMail-Group: any group-member sends an eMail to a
                    >>>>group-e-adress an the Mail is dispatches automatically to all members.
                    >>>>
                    >>>>I know there are services like yahougroups who do exactly this, but
                    >>>>I wonder wether it's possible to do something like this by my own.
                    >>>>
                    >>>>Further purposes could be to trigger any program on a webserver by a
                    >>>>special trigger-eMail.
                    >>>>
                    >>>>
                    >>>>
                    >>>That is easy. I do that all the time. Basically you need to assign a
                    >>>certain address to a mailbox reachable by POP3. Then you keep polling
                    >>>the mailbox periodically until a new message reaches there to be
                    >>>redistribute d to your mailing list.
                    >>>
                    >>>You may want to use this POP3 class for fetching your messages.
                    >>>
                    >>>http://www.phpclasses.org/pop3class
                    >>>
                    >>>
                    >>>[/color]
                    >>Thanks for this. I've been playing with it for a couple of hours. I've
                    >>always wanted to automatically verify new users to a mail list I
                    >>created. I'm sure you know what I mean. When they sign up I send an
                    >>automated email which they must respond to (leaving the subject
                    >>intact). This is going to work great (using cron to poll).
                    >>
                    >>Have you any clever method for pulling lines out of the headers array?
                    >>Using explode at the :'s will not work because of the Date line (time
                    >>contains :'s), so I do this:
                    >>(just curious to know if there is a simpler way to do it)
                    >>
                    >>[/color]
                    >
                    >
                    >Sure, strtok($line,": "); to pick the header name, and then strtok("");
                    >to pick the header value . Just keep in mind that header line that start
                    >with space or tab are continuation of previous header line value.
                    >
                    >
                    >[/color]
                    Thanks, once again. I'd never used strtok. I understand how it works
                    and I will probably rewrite some other scripts of mine to use it.

                    --
                    *************** **************
                    Chuck Anderson • Boulder, CO

                    Integrity is obvious.
                    The lack of it is common.
                    *************** **************

                    Comment

                    • Chuck Anderson

                      #11
                      Re: OT ? eMail as a trigger ?

                      Hanjo Grüßner wrote:
                      [color=blue]
                      >Am Sun, 12 Jun 2005 23:37:16 +0200 schrieb Manuel Lemos <mlemos@acm.org >:
                      >
                      >
                      >[color=green]
                      >>That is easy. I do that all the time. Basically you need to assign a
                      >>certain address to a mailbox reachable by POP3. Then you keep polling
                      >>the mailbox periodically until a new message reaches there to be
                      >>redistribut ed to your mailing list.
                      >>
                      >>[/color]
                      >
                      >Hello Manuel,
                      >
                      >and thanks. Your classes are running very well and are fine documented.
                      >
                      >But, sorry, how do I poll ?
                      >
                      >Greetings from the sunny shores of the baltic sea ;-)
                      >[/color]
                      Well I can tell you what I am going to do. Call it from a cron job.

                      Und Grüße aus Colorado, ... from the foot of the Rocky Mountains.

                      --
                      *************** **************
                      Chuck Anderson • Boulder, CO

                      Integrity is obvious.
                      The lack of it is common.
                      *************** **************

                      Comment

                      • Hanjo Grüßner

                        #12
                        Re: OT ? eMail as a trigger ?

                        Am Tue, 14 Jun 2005 06:43:47 +0200 schrieb Chuck Anderson
                        <websiteaddress @seemy.sig>:

                        [color=blue][color=green]
                        >>
                        >> But, sorry, how do I poll ?
                        >>
                        >> Greetings from the sunny shores of the baltic sea ;-)
                        >>[/color]
                        > Well I can tell you what I am going to do. Call it from a cron job.
                        >
                        > Und Grüße aus Colorado, ... from the foot of the Rocky Mountains.
                        >[/color]

                        Hello Chuck,

                        unfortunately there is no possibility for a cronjob on my webserver.
                        Is there no other possibility ?

                        Greetings from the seaside to the mountains

                        Hanjo

                        --
                        Software & Seminar-Kontor Hans-Joachim Grüßner
                        Glasholz
                        D-24369 Waabs
                        The premium domain gruessner.de is for sale on fruits.co. Secure the domain now and start your online success story. Safe payment and quick transfer are guaranteed.

                        Comment

                        Working...