In templates directory, create email.txt as below:
Dear {{ name }},Thank you for signing up with {{ product_name }}. Your new username is {{ username }}, and you can login at {{ login_url }}. Once logged in, you'll be able to access more features on our website. We hope that {{ product_name }} is of good use to you. If you have any feedback, please respond to this e-mail or submit it to us via our website.Regards,{{ product_name }} Administration{{ product_url }} |
the send mail function:
|
the user will be receiving like this:
Dear Ross,Thank you for signing up with Your Product Name.Your new username is rossp, and you can login at http://www.yourproject.com/login/. Once logged in, you'll be able to access more features on our website..We hope that Your Product Name is of good use to you. If you have any feedback, please respond to this e-mail or submit it to us via our website.Regards,Your Product Name Administrationhttp://www.yourproject.com/ |
The following code logs into an account, retrieves a list of
threads, displays information about them and displays the source of the
individual messages.
|
If you don’t have one running locally, you need to set EMAIL_HOST and
EMAIL_PORT in your settings.py file to a valid SMTP server.
EMAIL_HOST
= “mailhost.company.com”
(http://groups.google.com/group/django-users/browse_thread/thread/e2e5da1a395bbaa5/22c13145abf042a0?hl=en#22c13145abf042a0)
#Je suis en train de faire un project pour envoyer email sur
Django, je utilise le send_mail function de Python, mais il y a une
erreur (Je t’ai envoyee par email), je dois setup le SMPT serveur sur
mon ordinadeur?
|
This is *probably* a bug in python-libgmail, which should be fixed in 0.1.6.1 (Gutsy has 0.1.5.1, latest version is not 0.1.7)
http://sourceforge.net/project/downloading.php?group_id=113492&use_mirror=kent&filename=libgmail-0.1.8.tar.gz&8221181
http://libgmail.sourceforge.net/
libgmail — Python binding for Google’s Gmail service
Reference:
http://www.b-list.org/weblog/2006/sep/02/django-tips-user-registration/
http://www.stonemind.net/blog/2007/04/13/django-registration-for-newbies/
Python code:
Multi-attachment: http://code.djangoproject.com/ticket/1541
Python SendMail: http://gelb.bcom.at/trac/simplemail/browser/trunk/simplemail.py
Send HTML Mail: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/67083