Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #59290 > unrolled thread
| Started by | Cameron Simpson <cs@zip.com.au> |
|---|---|
| First post | 2013-11-13 18:17 +1100 |
| Last post | 2013-11-13 18:17 +1100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: sendmail library ?! Cameron Simpson <cs@zip.com.au> - 2013-11-13 18:17 +1100
| From | Cameron Simpson <cs@zip.com.au> |
|---|---|
| Date | 2013-11-13 18:17 +1100 |
| Subject | Re: sendmail library ?! |
| Message-ID | <mailman.2528.1384327078.18130.python-list@python.org> |
On 13Nov2013 05:52, Tamer Higazi <th982a@googlemail.com> wrote:
> I am looking for a python library that does mailing directly through
> "sendmail".
> When I look into the docs, I see only an "smtlip" library but nothing
> that could serve with sendmail or postfix.
Use the subprocess module. Pipe to:
/usr/sbin/sendmail -oi addr1 addr2 ...
If the exit code is 0, mail dispatched.
This is a trivial function; you don't need a library for this.
Both "sendmail" and "postfix" (and "qmail" et al) provide a "sendmail"
executable for exactly this purpose.
The smtplib is for making arbitrary SMTP operations, thus a whole
module. Sendmail does all that for you, you only need to deliver
the message to it and ensure it was accepted.
Cheers,
--
Cameron Simpson <cs@zip.com.au>
The mere existence of a problem is no proof of the existence of a solution.
- Yiddish Proverb
Back to top | Article view | comp.lang.python
csiph-web