from django.core.mail import send_mail send_mail('Subject here', 'Here is the message.', 'fr...@example.com', ['t...@example.com'], fail_silently=False)
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/yfrTK_xhMpUJ.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
On Mon, 12 Nov 2012 12:51:57 -0800 (PST), Chris Pagnutti
<chris.p...@gmail.com> declaimed the following in
gmane.comp.python.django.user:
> Yeah. Makes good sense. I guess that Postfix is one of the more popular
> options. Is there any reason why I should NOT use postfix.
>
Well, do you already have access to a running SMTP daemon? (Does
your server machine respond to local connection attempts on port 25? Is
the server machine part of a network that may have an SMTPd located on
another machine?
).
--
Wulfraed Dennis Lee Bieber AF6VN
wlf...@ix.netcom.com HTTP://wlfraed.home.netcom.com/
--
You received this message because you are subscribed to the Google Groups "Django users" group.
On Mon, 12 Nov 2012 20:48:04 -0500, Chris Pagnutti
<chris.p...@gmail.com> declaimed the following in
gmane.comp.python.django.user:
> Not sure. It's VPS and I was handed a Debian install with practically
> nothing on it. I even had to install make to be able to compile nginx.
> I'm looking into setting up Postfix+Dovecot+Roundcube (or SquirrelMail)
>
As I recall, your problem was to SEND mail. From a quick Google
session, Dovecot and Roundcube are not products for sending mail --
Dovecot being a POP3/IMAP server and Roundcube a web-mail interface.
Were you planning on hosting /mailboxes/ for users?
Postfix (alternatively, Sendmail, qmail, exim -- though qmail has
fallen behind in features) is the only item in the list needed to send
email /out/. {If I recall, it would also be used to receive mail sent
to your server, and /that/ would then need to be placed into a local
account mailbox -- you may need a POP3/IMAP server if you want to later
read those [presuming the only inbound is stuff for the sysop:
postm...@xxxx.xxx, ad...@xxxx.xxx, something like that] without SSH
into the server environment}.
{Hmmm, http://en.wikipedia.org/wiki/Exim implies the default SMTPd for
Debian is exim}
On Wed, 14 Nov 2012 11:41:11 -0800 (PST), Chris Pagnutti
<chris.p...@gmail.com> declaimed the following in
gmane.comp.python.django.user:
> Good point. At the moment, sending mail is my priority, but eventually
> I'll want to receive and view mail as well. Most guides I can find relate
> to setting up both sides of the story, so I figure I might as well just do
> it all at once.
>
Well... The SMTP daemon should also handle the "receive" part; if
properly configured with local user account mailboxes... (pre-spam era
one could connect to any SMTPd to transfer mail; mail didn't have to
either come from an internal user account or be sent to a local user
account -- these days, that would be considered an open relay)
I presume you have some sort of shell access to the server since you
are doing configuration. Basic shell mail clients didn't* need POP3;
they directly access the mailbox(es) on the machine itself. So if your
intent is purely to receive mail being sent to /you/ as administrator of
the server, you may not need the POP3/IMAP/Webmail stuff. Those
protocols are meant for when the server is used to store emails that
will be accessed from other computers at ad-hoc intervals. Since this is
a Django group -- have you considered making the webmail function a
Django application?
* It's been too many years, but the first mail client I used on my old
Amiga ONLY knew how to read a mailbox (AmigaElm); sending email invoked
a subprocess that took the composed mail and submitted it to a queue
directory -- it knew nothing about SMTP or POP3. I had to run a
simplified SMTP to process the outgoing queue, and a timed job to do
POP3 fetching into the mailbox. My first real Python program was to
create an outgoing SMTPd, because the two packages I'd tried had flaws
(one would block if it couldn't get to a destination host, the other
never sent to CC/BCC addresses).
--wlf...@ix.netcom.com HTTP://wlfraed.home.netcom.com/
Wulfraed Dennis Lee Bieber AF6VN
--
You received this message because you are subscribed to the Google Groups "Django users" group.