Hay, i was wondering how i would go about setting up django so that i can send emails from a standard Leopard installation.
In php i just use mail() and it sends the mail for me.
Thanks
Hay, i was wondering how i would go about setting up django so that i can send emails from a standard Leopard installation.
In php i just use mail() and it sends the mail for me.
Thanks
From the docs:
Mail is sent using the SMTP host and port specified in the EMAIL_HOST and EMAIL_PORT settings. The EMAIL_HOST_USER and EMAIL_HOST_PASSWORD settings, if set, are used to authenticate to the SMTP server, and the EMAIL_USE_TLS setting controls whether a secure connection is used.
So set your EMAIL_HOST
to a friendly SMTP server which will relay mail for you, and away you go.
Again, from the docs:
from django.core.mail import send_mail
send_mail('Subject here', 'Here is the message.', '[email protected]',
['[email protected]'], fail_silently=False)