Seeking play-by-email source and/or information on handling incoming emails

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • simonc

    Seeking play-by-email source and/or information on handling incoming emails

    I've been programming in assembler and C/C++ for a number of years, but I'm
    only just starting down the road of PHP & MYSQL.

    I have a couple of questions:

    (1) Before I start writing my own code, to learn from, and also avoid
    re-inventing the wheel, does anyone know of any existing source that
    implements a (basic or complex) play-by-email system using PHP and maybe
    MYSQL?

    (Or at least some information on how to handle incoming emails through PHP
    code.)

    The system will be purely email based (like majordomo or listserv) - there
    will be no web interface.

    I'm looking to implement something that will basically be able to receive
    emails, process them (and add stuff from/to a MYSQL database) and then send
    out emails.

    (2) Also, what information should I be requesting from potential web-hosts?
    i.e. what server software and set-up are they running. I ask this because
    the only article I did find on handling incoming emails, mentions amongst
    other things to get "PHP compiled as a CGI binary, not just as an Apache
    module" (whatever that means.)

    Thanks in advance,

    Simon.


  • Jeremy

    #2
    Re: Seeking play-by-email source and/or information on handling incoming emails


    "simonc" <no@email.com > schrieb im Newsbeitrag
    news:1eLhb.3$CE 2.5153@news2.ne ws.adelphia.net ...[color=blue]
    > I've been programming in assembler and C/C++ for a number of years, but[/color]
    I'm[color=blue]
    > only just starting down the road of PHP & MYSQL.
    >
    > I have a couple of questions:
    >
    > (1) Before I start writing my own code, to learn from, and also avoid
    > re-inventing the wheel, does anyone know of any existing source that
    > implements a (basic or complex) play-by-email system using PHP and maybe
    > MYSQL?
    >
    > (Or at least some information on how to handle incoming emails through PHP
    > code.)
    >
    > The system will be purely email based (like majordomo or listserv) - there
    > will be no web interface.
    >
    > I'm looking to implement something that will basically be able to receive
    > emails, process them (and add stuff from/to a MYSQL database) and then[/color]
    send[color=blue]
    > out emails.
    >
    > (2) Also, what information should I be requesting from potential[/color]
    web-hosts?[color=blue]
    > i.e. what server software and set-up are they running. I ask this because
    > the only article I did find on handling incoming emails, mentions amongst
    > other things to get "PHP compiled as a CGI binary, not just as an Apache
    > module" (whatever that means.)
    >
    > Thanks in advance,
    >
    > Simon.[/color]
    To be honest I would prefer the Apache module as it is faster and more
    secure. Otherwise what server software you want/need depends realy on what
    type of website your developing and what type of information the database
    should store.

    Jeremy


    Comment

    • simonc

      #3
      Re: Seeking play-by-email source and/or information on handling incoming emails

      So on servers where the PHP parser/interpreter (or whatever the exact term
      is) is an Apache module, my PHP code is unable to be activated by incoming
      emails?

      I'm confused here. Surely there are thousands of applications written in PHP
      that can receive incoming emails AND the PHP code is handled by an Apache
      module?

      Any clarification would be most appreciated. (And of course, any locations
      of example source code that shows this in practice.)

      Thanks, Simon.



      "Jeremy" <jeremy@schoenh aar.com> wrote in message
      news:bm93c8$4n6 $1@news1.nefonl ine.de...[color=blue]
      >
      > "simonc" <no@email.com > schrieb im Newsbeitrag
      > news:1eLhb.3$CE 2.5153@news2.ne ws.adelphia.net ...[color=green]
      > > I've been programming in assembler and C/C++ for a number of years, but[/color]
      > I'm[color=green]
      > > only just starting down the road of PHP & MYSQL.
      > >
      > > I have a couple of questions:
      > >
      > > (1) Before I start writing my own code, to learn from, and also avoid
      > > re-inventing the wheel, does anyone know of any existing source that
      > > implements a (basic or complex) play-by-email system using PHP and maybe
      > > MYSQL?
      > >
      > > (Or at least some information on how to handle incoming emails through[/color][/color]
      PHP[color=blue][color=green]
      > > code.)
      > >
      > > The system will be purely email based (like majordomo or listserv) -[/color][/color]
      there[color=blue][color=green]
      > > will be no web interface.
      > >
      > > I'm looking to implement something that will basically be able to[/color][/color]
      receive[color=blue][color=green]
      > > emails, process them (and add stuff from/to a MYSQL database) and then[/color]
      > send[color=green]
      > > out emails.
      > >
      > > (2) Also, what information should I be requesting from potential[/color]
      > web-hosts?[color=green]
      > > i.e. what server software and set-up are they running. I ask this[/color][/color]
      because[color=blue][color=green]
      > > the only article I did find on handling incoming emails, mentions[/color][/color]
      amongst[color=blue][color=green]
      > > other things to get "PHP compiled as a CGI binary, not just as an Apache
      > > module" (whatever that means.)
      > >
      > > Thanks in advance,
      > >
      > > Simon.[/color]
      > To be honest I would prefer the Apache module as it is faster and more
      > secure. Otherwise what server software you want/need depends realy on what
      > type of website your developing and what type of information the database
      > should store.
      >
      > Jeremy
      >
      >[/color]


      Comment

      • Eric Veltman

        #4
        Re: Seeking play-by-email source and/or information on handling incoming emails

        simonc wrote:
        [color=blue]
        > (Or at least some information on how to handle incoming emails through PHP
        > code.)[/color]

        First you need to know a way of starting your code when an e-mail arrives.
        I didn't know myself either what the best way would be, so I took a look
        at how majordomo does this. According to the majordomo INSTALL file,
        it seems that you can setup aliases for sendmail that don't correspond
        to actual accounts but instead pipe the received e-mail to the configured
        program. That looks like a good way to do it. Don't know whether a hosting
        provider would cooperate on modifying the sendmail aliases file though.

        Another way could be to have a normal e-mail address that corresponds
        to a real user account and put a .forward file in the home directory.
        There's a special syntax for specifying that you want to "forward"
        all incoming mails to a filter. Don't remember the exact details,
        but if you google, you'll probably find more details.
        [color=blue]
        > mentions amongst other things to get "PHP compiled as a CGI binary, not
        > just as an Apache module" (whatever that means.)[/color]

        CGI is the Common Gateway Interface, which is a - somewhat old fashioned,
        but still popular - standard which defines how a webserver can pass a
        request on to a program / executable / binary.

        Apache module is a more advanced way to achieving dynamic content, in this
        case the code which processes the web request is in an Apache "plugin" and
        not a standalone program / executable / binary.

        If you want your script to be launched when e-mail arrives, then it has
        to be a "standalone " / "commandlin e" / "console" script, see :



        Best regards,

        Eric

        Comment

        • Eric Haskins

          #5
          Re: Seeking play-by-email source and/or information on handling incoming emails

          You could look at OSticket a Web Hosting troubleticket system. It has a
          email system that checks an account for new mail at a set interval via cron.
          If there is new mail it opens a new ticket and replies to the customer and
          to support personnel informing them a ticket has been posted.

          I use it and I have a cronjob that starts Lynx and opens a page then closes
          every 10 mins.
          --
          Eric Haskins
          RackSPEED.Net
          WebHosting from $4.99/month
          Dedicated Servers
          Multiple UpStream Providers




          "Eric Veltman" <eric@[RemoveThis]veltman.nu> wrote in message
          news:vogt6gh30c fu89@corp.super news.com...[color=blue]
          > simonc wrote:
          >[color=green]
          > > (Or at least some information on how to handle incoming emails through[/color][/color]
          PHP[color=blue][color=green]
          > > code.)[/color]
          >
          > First you need to know a way of starting your code when an e-mail arrives.
          > I didn't know myself either what the best way would be, so I took a look
          > at how majordomo does this. According to the majordomo INSTALL file,
          > it seems that you can setup aliases for sendmail that don't correspond
          > to actual accounts but instead pipe the received e-mail to the configured
          > program. That looks like a good way to do it. Don't know whether a hosting
          > provider would cooperate on modifying the sendmail aliases file though.
          >
          > Another way could be to have a normal e-mail address that corresponds
          > to a real user account and put a .forward file in the home directory.
          > There's a special syntax for specifying that you want to "forward"
          > all incoming mails to a filter. Don't remember the exact details,
          > but if you google, you'll probably find more details.
          >[color=green]
          > > mentions amongst other things to get "PHP compiled as a CGI binary, not
          > > just as an Apache module" (whatever that means.)[/color]
          >
          > CGI is the Common Gateway Interface, which is a - somewhat old fashioned,
          > but still popular - standard which defines how a webserver can pass a
          > request on to a program / executable / binary.
          >
          > Apache module is a more advanced way to achieving dynamic content, in this
          > case the code which processes the web request is in an Apache "plugin" and
          > not a standalone program / executable / binary.
          >
          > If you want your script to be launched when e-mail arrives, then it has
          > to be a "standalone " / "commandlin e" / "console" script, see :
          >
          > http://nl2.php.net/manual/en/features.commandline.php
          >
          > Best regards,
          >
          > Eric[/color]


          Comment

          • simonc

            #6
            Re: Seeking play-by-email source and/or information on handling incoming emails

            Thanks for the reply - but I'm looking for a solution that allows emails to
            be acted upon, and sent between game participants, as quickly as possibly -
            rather than at a leisurely pace where the server polls occasionally (every
            10 mins. in your example) for newly-arrived email.

            Simon.


            "Eric Haskins" <hostmaster@rac kspeed.net> wrote in message
            news:gS6ib.7859 $843.3505@nwrdd c03.gnilink.net ...[color=blue]
            > You could look at OSticket a Web Hosting troubleticket system. It has a
            > email system that checks an account for new mail at a set interval via[/color]
            cron.[color=blue]
            > If there is new mail it opens a new ticket and replies to the customer and
            > to support personnel informing them a ticket has been posted.
            >
            > I use it and I have a cronjob that starts Lynx and opens a page then[/color]
            closes[color=blue]
            > every 10 mins.
            > --
            > Eric Haskins
            > RackSPEED.Net
            > WebHosting from $4.99/month
            > Dedicated Servers
            > Multiple UpStream Providers
            >
            >
            >
            >
            > "Eric Veltman" <eric@[RemoveThis]veltman.nu> wrote in message
            > news:vogt6gh30c fu89@corp.super news.com...[color=green]
            > > simonc wrote:
            > >[color=darkred]
            > > > (Or at least some information on how to handle incoming emails through[/color][/color]
            > PHP[color=green][color=darkred]
            > > > code.)[/color]
            > >
            > > First you need to know a way of starting your code when an e-mail[/color][/color]
            arrives.[color=blue][color=green]
            > > I didn't know myself either what the best way would be, so I took a look
            > > at how majordomo does this. According to the majordomo INSTALL file,
            > > it seems that you can setup aliases for sendmail that don't correspond
            > > to actual accounts but instead pipe the received e-mail to the[/color][/color]
            configured[color=blue][color=green]
            > > program. That looks like a good way to do it. Don't know whether a[/color][/color]
            hosting[color=blue][color=green]
            > > provider would cooperate on modifying the sendmail aliases file though.
            > >
            > > Another way could be to have a normal e-mail address that corresponds
            > > to a real user account and put a .forward file in the home directory.
            > > There's a special syntax for specifying that you want to "forward"
            > > all incoming mails to a filter. Don't remember the exact details,
            > > but if you google, you'll probably find more details.
            > >[color=darkred]
            > > > mentions amongst other things to get "PHP compiled as a CGI binary,[/color][/color][/color]
            not[color=blue][color=green][color=darkred]
            > > > just as an Apache module" (whatever that means.)[/color]
            > >
            > > CGI is the Common Gateway Interface, which is a - somewhat old[/color][/color]
            fashioned,[color=blue][color=green]
            > > but still popular - standard which defines how a webserver can pass a
            > > request on to a program / executable / binary.
            > >
            > > Apache module is a more advanced way to achieving dynamic content, in[/color][/color]
            this[color=blue][color=green]
            > > case the code which processes the web request is in an Apache "plugin"[/color][/color]
            and[color=blue][color=green]
            > > not a standalone program / executable / binary.
            > >
            > > If you want your script to be launched when e-mail arrives, then it has
            > > to be a "standalone " / "commandlin e" / "console" script, see :
            > >
            > > http://nl2.php.net/manual/en/features.commandline.php
            > >
            > > Best regards,
            > >
            > > Eric[/color]
            >
            >[/color]


            Comment

            Working...