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


Groups > comp.lang.python > #41097

Re: This mail never gets delivered. Any ideas why?

Path csiph.com!usenet.pasdenom.info!aioe.org!news.mixmin.net!weretis.net!feeder1.news.weretis.net!news.tota-refugium.de!.POSTED!not-for-mail
From Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de>
Newsgroups comp.lang.python
Subject Re: This mail never gets delivered. Any ideas why?
Date Mon, 11 Mar 2013 23:34:50 +0100
Organization A newly installed InterNetNews server
Lines 37
Message-ID <khlm6b$i7g$1@r03.glglgl.gl> (permalink)
References <fdc2a4d2-1967-4906-907e-3cf121694549@googlegroups.com> <c7fe4276-8ecf-4229-94e1-9b95a49f549a@googlegroups.com> <10f30df1-e0f8-4834-ae5f-b6e0d0aac079@googlegroups.com> <513c209d$0$6512$c3e8da3$5496439d@news.astraweb.com> <3daebceb-88e2-4d0b-bc32-802e6cece93e@googlegroups.com> <513c624c$0$6512$c3e8da3$5496439d@news.astraweb.com> <08433d4e-6ffb-4929-a708-f8ba1d670449@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-7; format=flowed
Content-Transfer-Encoding 8bit
X-Trace tota-refugium.de 1363041604 12427 eJwFwYEBwDAEBMCVwj9hnBL2H6F3BhfvSzenre2bqr5p4ByHDqC3Q1YwLtEDkq3xXA9Urc721bKhZ3KfvcyLKs50Bo+CHvkdtFgMM39t+h0e (11 Mar 2013 22:40:04 GMT)
X-Complaints-To abuse@news.tota-refugium.de
NNTP-Posting-Date Mon, 11 Mar 2013 22:40:04 +0000 (UTC)
User-Agent Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130215 Thunderbird/17.0.3
X-User-ID eJwFwQcBwEAIBDBLcIyCnLL8S/jExNn7UzdXOzsCr+ZMUzuXoUXjfhQiuaIbSwvR4koinXwaJBDn
In-Reply-To <08433d4e-6ffb-4929-a708-f8ba1d670449@googlegroups.com>
Cancel-Lock sha1:n5KF3/8EAcV8nYW1TqO2Al9NQOQ=
X-NNTP-Posting-Host eJwFwQkBACAIA8BK8oxhHAXpH8E7WEgUPRCOwZwXS41YZWU34S9jVvmDUHp6JMltgPbRZ5eOYuW+sks53VKL7pcHdfj2LI7rySxt694fgOIeaA==
Xref csiph.com comp.lang.python:41097

Show key headers only | View raw


Am 10.03.2013 19:39 schrieb Νίκος Γκρ33κ:
> Hey man  this worked via Python!

[...]

> 		if( os.system( 'echo "%s" | mail -s "%s" support@superhost.gr' % (MESSAGE, FROM) ) ):

[...]

> Thank you! I beleive this is the simplest way of sending an email!

Until you get a MESSAGE which has a " sign in it, or a FROM.

(Sorry, didn't see this message before.)

In order to prevent trouble with this, it might be better to use 
subprocess and to do

sp = subprocess.Popen(['mail', '-f', FROM, '-s', SUBJECT,
     'support@superhost.gr], stdin=subprocess.PIPE)
sp.communicate(MESSAGE)
res = sp.wait()
if res:
     ...
else:
     ...


If you do so, you can have FROMs, SUBJECTs and MESSAGEs conaining every 
character you want, including " and ', an no shell will complain about 
it or be confused.

(Note that I changed the arguments for mail a little bit, because -s 
prevedes the subject and -f the from.)


Thomas

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


Thread

This mail never gets delivered. Any ideas why? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-09 13:20 -0800
  Re: This mail never gets delivered. Any ideas why? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-09 13:25 -0800
    Re: This mail never gets delivered. Any ideas why? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-09 20:42 -0800
      Re: This mail never gets delivered. Any ideas why? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-03-10 05:56 +0000
        Re: This mail never gets delivered. Any ideas why? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-09 22:00 -0800
          Re: This mail never gets delivered. Any ideas why? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-10 03:19 -0700
          Re: This mail never gets delivered. Any ideas why? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-03-10 10:37 +0000
            Re: This mail never gets delivered. Any ideas why? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-10 11:39 -0700
              Re: This mail never gets delivered. Any ideas why? Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2013-03-11 23:34 +0100
                Re: This mail never gets delivered. Any ideas why? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-26 01:49 -0700
                Re: This mail never gets delivered. Any ideas why? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-26 03:26 -0700
                Re: This mail never gets delivered. Any ideas why? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-05-26 13:44 -0700
                Re: This mail never gets delivered. Any ideas why? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-05-26 13:48 -0700
                Re: This mail never gets delivered. Any ideas why? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-05-26 14:43 -0700
                Re: This mail never gets delivered. Any ideas why? Cameron Simpson <cs@zip.com.au> - 2013-05-27 10:22 +1000
    Re: This mail never gets delivered. Any ideas why? Michael Torrie <torriem@gmail.com> - 2013-03-09 22:07 -0700
      Re: This mail never gets delivered. Any ideas why? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-09 21:10 -0800
        Re: This mail never gets delivered. Any ideas why? Michael Torrie <torriem@gmail.com> - 2013-03-10 10:09 -0600
          Re: This mail never gets delivered. Any ideas why? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-10 10:53 -0700
            Re: This mail never gets delivered. Any ideas why? Michael Torrie <torriem@gmail.com> - 2013-03-10 20:20 -0600
          Re: This mail never gets delivered. Any ideas why? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-10 10:53 -0700
      Re: This mail never gets delivered. Any ideas why? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-09 21:10 -0800
    Re: This mail never gets delivered. Any ideas why? Chris Angelico <rosuav@gmail.com> - 2013-03-10 09:15 +1100
  Re: This mail never gets delivered. Any ideas why? Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2013-03-11 06:25 +0100
    Re: This mail never gets delivered. Any ideas why? Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2013-03-11 06:47 +0100
      Re: This mail never gets delivered. Any ideas why? Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2013-03-11 06:59 +0100
  Re: This mail never gets delivered. Any ideas why? nagia.retsina@gmail.com - 2013-03-11 02:15 -0700
    Re: This mail never gets delivered. Any ideas why? Benjamin Schollnick <benjamin@schollnick.net> - 2013-03-11 06:44 -0400
    Re: This mail never gets delivered. Any ideas why? Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2013-03-11 17:24 +0100

csiph-web