Re: Sending mail from 'current user' in Python



Marcus Alanen <marcus.alanen@xxxxxx> writes:

> >>I've also tried opening a pipe to sendmail, and feeding the
> >>message to that instead. This too works great [but] doesn't
> >>seem like much of an improvement, portability-wise.
>
> No, but at least it can be expected to do the right thing
> w.r.t. sending the mail.

Good point.

> >>Finally, if at all possible I'd also like to get this working on
> >>Windows, so I'd rather stick with the standard smtplib if I can.
> > smtplib needs an SMTP server to connect to. For unix systems, this is
> > typically localhost. What do you use for Windows systems? Or are you
> > connecting to your machine to deliver the mail?
>
> I'd be very surprised if the typical SMTP server is localhost
> on unix-like computers. [...] Let the sendmail program take
> care of those details.
>
> The Unix Programming Frequently Asked Questions "Q5.2 What's the best
> way to send mail from a program?" is worth reading.

Thanks to you and everyone else who contributed to this thread.

I've now decided to accept the inherent non-portabilitiness of
the whole concept of 'sending mail from within a program', and
will be going with a Unix-only see-if-you-can-find-sendmail
approach.

--
Leo Breebaart <leo@xxxxxxxxxx>
.



Relevant Pages

  • Re: This mail sending code snippet does not work
    ... I also tested to use localhost using system.web.mail instead of the new ... I get an exception: the transport could not connect to the host when using ... There seems to be something wrong with the localhost smtp server but I can't ... I was working the local machine where the app was residing via Radmin ...
    (microsoft.public.dotnet.languages.vb)
  • RE: VB 2003, 0x80040213
    ... You will need an SMTP server you can relay through. ... server or smartrelay on them, and <localhost> will not find your ISP, since ...
    (microsoft.public.dotnet.languages.vb)
  • Re: sending email
    ... Are you running an SMTP server locally (on localhost)? ... MAIL FROM:anyone@domain.com (put brackets around the email addresses, ... If you do not get this email assuming you put your email address in the RCPT ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: How to send E-mail without an external SMTP server ?
    ... haven't found documents about how to use it after googleing. ... any examples of using smtpd? ... Do I have to setup a smtp server on my localhost? ...
    (comp.lang.python)