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


Groups > comp.lang.python > #57286 > unrolled thread

using smtp in python

Started byashikbekal@gmail.com
First post2013-10-22 11:00 -0700
Last post2013-10-23 17:16 +1100
Articles 4 — 4 participants

Back to article view | Back to comp.lang.python


Contents

  using smtp in python ashikbekal@gmail.com - 2013-10-22 11:00 -0700
    Re: using smtp in python Dan Stromberg <drsalists@gmail.com> - 2013-10-22 11:44 -0700
    Re: using smtp in python xDog Walker <thudfoo@gmail.com> - 2013-10-22 15:02 -0700
    Re: using smtp in python Chris Angelico <rosuav@gmail.com> - 2013-10-23 17:16 +1100

#57286 — using smtp in python

Fromashikbekal@gmail.com
Date2013-10-22 11:00 -0700
Subjectusing smtp in python
Message-ID<90f07095-359c-4c57-9948-39ac089b21da@googlegroups.com>
I'm trying to send an email using python. The mail content is taken from file and subject of the mail is name of the file. The program is invoked as 
    ./mailclient.py -f <from email address> -d <recipient email address> -i <file1> -s <server IP address>
.
How to i use server ip address and the mail id to send the email ? (would i require the password)

[toc] | [next] | [standalone]


#57297

FromDan Stromberg <drsalists@gmail.com>
Date2013-10-22 11:44 -0700
Message-ID<mailman.1374.1382467449.18130.python-list@python.org>
In reply to#57286

[Multipart message — attachments visible in raw view] — view raw

On Tue, Oct 22, 2013 at 11:00 AM, <ashikbekal@gmail.com> wrote:

> I'm trying to send an email using python. The mail content is taken from
> file and subject of the mail is name of the file. The program is invoked as
>     ./mailclient.py -f <from email address> -d <recipient email address>
> -i <file1> -s <server IP address>
> .
> How to i use server ip address and the mail id to send the email ? (would
> i require the password)
> --
> https://mail.python.org/mailman/listinfo/python-list
>

Some SMTP servers require a password and some do not.  I'm guessing more
and more do, as spammers attack.

Here's a module that shows how to do it with a password:
http://stromberg.dnsalias.org/svn/mailer/trunk/mailer.py

You can check it out with svn checkout <url>, or just browse to the URL in
a web browser.

HTH

[toc] | [prev] | [next] | [standalone]


#57319

FromxDog Walker <thudfoo@gmail.com>
Date2013-10-22 15:02 -0700
Message-ID<mailman.1385.1382479459.18130.python-list@python.org>
In reply to#57286
On Tuesday 2013 October 22 11:44, Dan Stromberg wrote:
> Some SMTP servers require a password and some do not

POP3 before SMTP ?

-- 
Yonder nor sorghum stenches shut ladle gulls stopper torque wet 
strainers.

[toc] | [prev] | [next] | [standalone]


#57341

FromChris Angelico <rosuav@gmail.com>
Date2013-10-23 17:16 +1100
Message-ID<mailman.1394.1382509010.18130.python-list@python.org>
In reply to#57286
On Wed, Oct 23, 2013 at 9:02 AM, xDog Walker <thudfoo@gmail.com> wrote:
> On Tuesday 2013 October 22 11:44, Dan Stromberg wrote:
>> Some SMTP servers require a password and some do not
>
> POP3 before SMTP ?

Or just IP-based restrictions (computers on 192.168.0.0/24 may relay
mail, all others may only send to the domains managed here - same
approach as is often used for caching+authoritative DNS resolvers).

ChrisA

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web