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
0 answers

Django email log file "sent" growing

I have a sent file that keeps growing on my staging server. It stores a log of all emails sent and I don't know what's causing this behaviour, it doesn't look like a feature from the Django framework (1.8). I can't find any reference of this log…
Vadorequest
  • 16,593
  • 24
  • 118
  • 215
0
votes
0 answers

smtplib.SMTPServerDisconnected after sending multiple mails in Django

I have a blog post objects. After blog post created I have a signal to dispatch emails. And I want to send emails to multiple subscribers. I am using google mail as a mail server. I put in my settings file some attributes for using mail: EMAIL_HOST…
Oleg Klimenko
  • 138
  • 1
  • 5
  • 20
0
votes
1 answer

Django emailing the user data from a model

I Have a django function that bans users and adds them to a Banned_User table, which has a profile and reason_reported column to mark them as banned. I'm looking to send an email to the user,once banned with a list of reasons from the report_reasons…
Shadowwz
  • 57
  • 1
  • 7
0
votes
3 answers

How to add Banned Users to table,and send details to user's email within Django Admin

I have a simple banning function that sets user active to false and a basic emailing function to send emails. The tables I am working with are User,Profile,Report & Banned_User Table. I am looking to: add the user Profile,Reason_reported from…
Shadowwz
  • 57
  • 1
  • 7
0
votes
0 answers

Python / Django: cannot email TempFile, 'object has no attribute 'splitlines''

I have written a function that turns a queryset into a CSV file, that is then emailed to the user. Since there is no need to store the file on the system I've decided to use Tempfile objects. However though I am succesfull in writing to these…
Jasper
  • 2,131
  • 6
  • 29
  • 61
0
votes
1 answer

Django post-office: unable to open email attachement

I've written a django view that loads a number of PDF files and combines them into a .zipfile. I dont want to save the object on the server, so I am using StringIO() This is done with the following code: zip_buffer = StringIO.StringIO() …
Jasper
  • 2,131
  • 6
  • 29
  • 61
0
votes
3 answers

Iterate JSON in a django template

I have a json coming from a view in below format , [ { "model":"booking.bookeditem", "pk":192, "fields":{ "Booking_id":155, "hoarding":9, "date_from":"2017-11-21", …
user8783337
  • 1
  • 1
  • 3
0
votes
3 answers

How to add base64 image data as attachment?

I want to create email via EmailMultiAlternatives but I have image data as base64 - from POST data. And I want to send it as attachment via email. For now I have (view): ctx = { 'username': request.user.username, 'img': request.POST['image']…
Nips
  • 13,162
  • 23
  • 65
  • 103
0
votes
2 answers

Using Django to send Gmail

This is very much potentially a duplicate question, but none of the other obvious duplicates have resolved the issue for me: This is an inherited project. My settings.py includes: EMAIL_BACKEND =…
GeneralBear
  • 1,011
  • 3
  • 11
  • 35
0
votes
1 answer

Send templates emails Django 1.11 error (html tags in letter)

I am trying to send template emails. Code: def send_admin_notification(ticket): subject = "Notification: NEW TICKET." to = [DEFAULT_ADMIN_EMAIL] from_email = settings.DEFAULT_FROM_EMAIL template = 'emails/admin.html' ctx = { …
Beliaf
  • 577
  • 2
  • 8
  • 25
0
votes
0 answers

Fields of the instance are not displayed in the email template

Some fields of the instance does not show up in my email template. See below, the field user_phone is not displayed. I have view which get or create User: views.py # Get informations for creating the User user, created =…
Aurélien
  • 1,617
  • 1
  • 21
  • 33
0
votes
1 answer

Passing Unique Variable when Sending E-Mail with Django

In my Django project I have leads which belong to an organization. One of my views filters these leads by organization and then e-mails them a message. This message is in the form of an html template. Currently this is how I do it: # FIRST: get a…
ng150716
  • 2,195
  • 5
  • 40
  • 61
0
votes
1 answer

How to set SMTP for customer in production?

What is the best practice for setting customer's SMTP in Django? Can I make them to set itself? I can't do that inside settings, otherwise they would have to tell me their password. EMAIL_BACKEND =…
Milano
  • 18,048
  • 37
  • 153
  • 353
0
votes
1 answer

Testing Django Email for error handling reporting

I'd like to setup an automated mailing system that notifies the Admin user when an Exception has been raised in a Django App. For now, I'd simply like to test the Email notification system and have followed numerous tutorials and tips here and here…
pymat
  • 1,090
  • 1
  • 23
  • 45
0
votes
1 answer

Django send email with attachement

I tried to send some files in mail using Django EmailMessage class The files attachment that I want to send are in DB, provided by each user during registration to my site. I'have tried this but it does not work myapp/views.py: from django.core.mail…
VITALYS WEB
  • 759
  • 1
  • 8
  • 16