Questions tagged [django-email]

django-email refers to questions about sending emails in your Django application

django-email refers to questions about sending emails in your Django application.

See documentation.

325 questions
0
votes
1 answer

Django mail_admins vs send_mail

I can get my django application to properly report server errors by email using the obvious settings : DEBUG = False ADMINS = (('name','email'),) MANAGERS = (('name','email'),) EMAIL_HOST = 'ip address' EMAIL_HOST_USER = 'user' EMAIL_PORT =…
Jglstewart
  • 696
  • 1
  • 8
  • 16
0
votes
4 answers

Format email message in Django

I'm trying to send email message in one of my views and would like to format the body of the message, such that it shows in different lines. This is a snippet code in views.py: body = "Patient Name: " + patient_name + \ …
James L.
  • 1,143
  • 22
  • 52
0
votes
2 answers

Django settings - dynamic value for DEFAULT_FROM_EMAIL

I'd like to be able to change sender email address from the admin. However, the default sender email is specified in settings.py with DEFAULT_FROM_EMAIL. What's a good approach to achieving this? Edit: The main problem here is that…
frnhr
  • 12,354
  • 9
  • 63
  • 90
0
votes
1 answer

Get the email field of an user with Lookup Fields

I have a model with a field associated to a user with ForeignKey, I need to send an email to that user when the user do an action, my question is not about to send the email instead is how to get that email. App works like that: User pick one of a…
dfrojas
  • 673
  • 1
  • 13
  • 32
0
votes
0 answers

Check condition and send email

I need to check if a contract is about to end and, if so, send a warning mail. I don't know how to approach it. Using a script? A kind of view?. So far, I've see there's an email library I could use and maybe with a query in a views.py but I don't…
loar
  • 1,505
  • 1
  • 15
  • 34
0
votes
1 answer

Attach a gererated .bib (and .ris and .txt) file to email in Python

I have a template that I populate based on a user's choices. Rather than render this template as the body of the email, I want to send it as an attachment. How do I 'write' to my .bib template (and, similarly to my .ris and .txt) that I want to use…
steph
  • 701
  • 2
  • 10
  • 30
0
votes
1 answer

email.send() taking forever for manual connection

django 1.4 version I know about send_email. But, I need to set manual connection for every email from db so using send() function. from django.core.mail import EmailMessage, get_connection e = EmailMessage('sub', 'body', to=['to@email.com']) Now,…
user2349115
  • 1,288
  • 2
  • 17
  • 34
0
votes
2 answers

django send_email() shows success but no email received

I am learning how to send an email in Djgnao. I have configured # settings.py EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' EMAIL_HOST = 'smtp.gmail.com' EMAIL_HOST_USER = '@gmail.com' EMAIL_HOST_PASSWORD = '
Lelouch
  • 2,111
  • 2
  • 23
  • 33
0
votes
1 answer

Error in sending emailusing smtplib in Django

I am new to Django development. I have a contact message form which sends the data collected from the form to the recipient and saves the form in the database as well (sqlite). The code for views.py: def contact(request): if request.method ==…
Somdip Dey
  • 3,346
  • 6
  • 28
  • 60
0
votes
1 answer

Mailchimp, send_mail() via Django, Open rate tracking

I am deciding whether to send emails via Mailchimp or Django. My email templates are quite basic, and the mail-merge (with various fields specific to user) could be easily done in the Django template system The pros of Mailchimp are - tracking open…
dowjones123
  • 3,695
  • 5
  • 40
  • 83
0
votes
1 answer

Using a colon in a string

I have built a custom invite app for my site. To activate an invite you must follow a link sent to your email. The issue then becomes, my email sending function is having trouble sending a string as a message that looks like this: custom_message =…
ApathyBear
  • 9,057
  • 14
  • 56
  • 90
0
votes
2 answers

What is the proper way to set the "From" header in an email using Django EmailMessage class?

I'm able to send an email and set most headers with no problem. But this has been giving me odd results for quite some time now. This is where I'm currently at: email = EmailMessage( 'My foobar subject!!', render_to_string( …
teewuane
  • 5,524
  • 5
  • 37
  • 43
0
votes
1 answer

No ReverseMatch : password reset activation email is not working in django?

I am trying to see if password reset works in my development environment. The activation email is sent out to my console. but when I paste it on the browser, I get the following error: Request Method: GET Request URL: …
eagertoLearn
  • 9,772
  • 23
  • 80
  • 122
0
votes
2 answers

smtplib doesn't fail on invalid email addresses

In django, I tried sending a mail using send_mail like : from django.core.mail import send_mail send_mail("test", "test", settings.EMAIL_HOST_USER, ["sasdadome@asdijandasd.com"]) This surprisingly sends me a status of 1, which means it was…
Deepankar Bajpeyi
  • 5,661
  • 11
  • 44
  • 64
0
votes
1 answer

django.core.mail send_email with secure connection

Im trying to use django send_email function but it fails on authentication. In fact, django returns me message along the lines - ssl not found in this django installation. I do have ssl-1.15 on my pythonpath and i could import it without errors. So…
Odif Yltsaeb
  • 5,575
  • 12
  • 49
  • 80