Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #98548

Re: Getting response by email reply message

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Tim Chase <python.list@tim.thechases.com>
Newsgroups comp.lang.python
Subject Re: Getting response by email reply message
Date Mon, 9 Nov 2015 12:15:29 -0600
Lines 32
Message-ID <mailman.185.1447093595.16136.python-list@python.org> (permalink)
References <79f2c622-e626-43ae-bcec-f85d394ce575@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-Trace news.uni-berlin.de 98jhUoTkOFenrN+CdQ2x6Q9bmokgebYq+3oGrzBjGN7w==
Return-Path <python.list@tim.thechases.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.014
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'scripts': 0.09; 'pop3': 0.09; 'scripting': 0.09; 'subject:Getting': 0.09; 'python': 0.10; 'accordingly.': 0.13; 'exception': 0.13; 'appropriate': 0.14; 'server,': 0.15; '-tkc': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'poll': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'stdin': 0.16; 'wrote:': 0.16; 'frameworks': 0.18; 'solution.': 0.18; '(usually': 0.22; 'pipe': 0.22; '(or': 0.23; 'matching': 0.23; 'smtp': 0.23; 'somewhere': 0.24; 'header:In-Reply-To:1': 0.24; 'script': 0.25; "doesn't": 0.26; 'external': 0.27; '(e.g.': 0.27; 'skip:( 20': 0.28; 'nntp': 0.29; 'launch': 0.29; "i'd": 0.31; 'getting': 0.33; 'options': 0.33; 'similar': 0.33; 'server': 0.34; 'but': 0.36; 'should': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'being': 0.37; 'expect': 0.37; 'addressed.': 0.37; 'charset:us-ascii': 0.37; 'rather': 0.39; 'to:addr:python.org': 0.40; 'some': 0.40; 'save': 0.60; 'your': 0.60; 'email addr:gmail.com': 0.62; 'above,': 0.63; 'received:46': 0.63; 'biggest': 0.67; 'act': 0.67; 'reply': 0.68; 'email,': 0.69; 'receive': 0.71; 'answer.': 0.72; 'inbox': 0.72; 'mail,': 0.72; 'mails': 0.88; 'subject:response': 0.91
X-Sender-Id wwwh|x-authuser|tim@thechases.com
X-Sender-Id wwwh|x-authuser|tim@thechases.com
X-MC-Relay Neutral
X-MailChannels-SenderId wwwh|x-authuser|tim@thechases.com
X-MailChannels-Auth-Id wwwh
X-MC-Loop-Signature 1447093015411:1098709861
X-MC-Ingress-Time 1447093015411
In-Reply-To <79f2c622-e626-43ae-bcec-f85d394ce575@googlegroups.com>
X-Mailer Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu)
X-AuthUser tim@thechases.com
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Xref csiph.com comp.lang.python:98548

Show key headers only | View raw


On 2015-11-09 08:12, zljubisic@gmail.com wrote:
> I know how to send an email, but I would like to be able to receive
> a reply and act accordingly. Mail reply should contain yes/no
> answer.

You have a couple options that occur to me:

1) set up an SMTP server somewhere (or use the existing one you're
receiving this email at in the event you're getting it as mail
rather than reading it via NNTP or a web interface) to receive the
mail, then create a Python script to poll that inbox (usually POP3 or
IMAP) for messages addressed.  The mails can be extracted, parsed,
and deleted

2) similar to above, set up an SMTP server, but use server processing
scripts (e.g. procmail scripts) to launch some script when matching
emails are received.  It would save you from polling (reducing server
load) and most scripting frameworks pipe the message in on stdin so
you don't have to muck with POP3/IMAP logins.

3) write your own STMP daemon that would do listen and react when
appropriate messages come in.

In most cases, I'd expect that #2 is the easiest/best solution. The
biggest exception being if you have a mail server that doesn't play
well with external tools that expect stdin/stdout processing
(coughexchangecough).

-tkc


Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Getting response by email reply message zljubisic@gmail.com - 2015-11-09 08:12 -0800
  Re: Getting response by email reply message Joel Goldstick <joel.goldstick@gmail.com> - 2015-11-09 11:21 -0500
    Re: Getting response by email reply message zljubisic@gmail.com - 2015-11-09 13:45 -0800
      Re: Getting response by email reply message Laura Creighton <lac@openend.se> - 2015-11-10 06:42 +0100
        Re: Getting response by email reply message zljubisic@gmail.com - 2015-11-09 23:09 -0800
          Re: Getting response by email reply message Laura Creighton <lac@openend.se> - 2015-11-10 11:23 +0100
          Re: Getting response by email reply message Laura Creighton <lac@openend.se> - 2015-11-10 11:37 +0100
  Re: Getting response by email reply message Tim Chase <python.list@tim.thechases.com> - 2015-11-09 12:15 -0600
    Re: Getting response by email reply message zljubisic@gmail.com - 2015-11-09 13:53 -0800
      Re: Getting response by email reply message Denis McMahon <denismfmcmahon@gmail.com> - 2015-11-09 22:14 +0000
      Re: Getting response by email reply message Tim Chase <python.list@tim.thechases.com> - 2015-11-09 16:45 -0600
  Re: Getting response by email reply message Ian Kelly <ian.g.kelly@gmail.com> - 2015-11-09 15:30 -0700
    Re: Getting response by email reply message Marko Rauhamaa <marko@pacujo.net> - 2015-11-10 00:43 +0200
  Re: Getting response by email reply message Chris Angelico <rosuav@gmail.com> - 2015-11-10 09:37 +1100

csiph-web