Questions tagged [django-email]

1

votes
0

answer
54

Views

Django reset password sender and receiver inverted

In Django my project I add the 'Frorget password' link. In my urls.py: path('accounts/', include('django.contrib.auth.urls')), in my settings.py: # Email setting EMAIL_USE_TLS = True EMAIL_HOST = 'email-smtp.us-east-1.amazonaws.com' EMAIL_PORT = 587 EMAIL_FROM = '[email protected]' EMAIL_HOST_USER = '...
Manuel Santi
1

votes
1

answer
82

Views

Upload files via email in Django. General algorithm

How to implement something like this: If someone send email with file in attachment to [email protected], this file is added automatically to database. Please general algorithm how to do or suggest existing app
Mimi Bubu
1

votes
1

answer
589

Views

Django - Userena not sending email

I've installed the Userena app and have it running. I can register but no emails are being sent out. I'm overriding the signup form if that makes a difference. I'm not getting any error messages and I can see the users are being created in the database. settings.py EMAIL_BACKEND = 'django.core.mail....
MarioB
1

votes
1

answer
200

Views

Call a template in html_content in django core email

How can I call a template instead of plain HTML to send email with django core email? My views: to = articles.user.email html_content = 'This is your email content...' msg = EmailMultiAlternatives('You have an email',html_content,'[email protected]',[to]) msg.attach_alternative(html_content,'text/htm...
dfrojas
1

votes
1

answer
93

Views

Django: TypeError preventing attaching a bytes-like object to email

I am trying to use xlsxwriter to generate a xlsx file and then send it as an attachment in email. Here is what I have now: def WriteToExcel(project): output = BytesIO() workbook = xlsxwriter.Workbook(output) #putting in data workbook.close() xlsx_data = output.getvalue() # xlsx_data contains the Exc...
Hansong Li
1

votes
1

answer
339

Views

Exceptions in send_mail when fail_silently=True

I was going to use send_mail function to send email, and I was hoping that using fail_silently=True would prevent this function from raising exceptions. It turns out it does work if SMTPException is raised; however I noticed it doesn't intercept socket.error exception - so if STMP server is down, a...
Alex Vyushkov
1

votes
1

answer
194

Views

Email confirmation system — how to set submitted emails to recipient_list in signal

I successfully manually sent an email to specific email address and activated the user but I cannot figure out how to: Set submitted emails into recipient_list in my post_save_activation_receiver signal, since email field itself is defined in other model (if it is possible)? Make this emails that I...
esnaf96
1

votes
1

answer
43

Views

How to dynamically turn off and on email sending?

I have a model Reservation which sends email to user when it's created. For testing purposes, I want to populate database with hundreds of Reservations from time to time. It can produce thousands of emails so I would like to turn off email sending, or dynamically change email backend if possible....
Milano
1

votes
1

answer
255

Views

Mailgun Email sender isn't what its supposed to be

So ive just set up django emails with mailgun, and sent the first email. This is the config I have in Django: EMAIL_BACKEND = config('EMAIL_BACKEND', default='django.core.mail.backends.smtp.EmailBackend') EMAIL_HOST = config('EMAIL_HOST', default='') EMAIL_PORT = config('EMAIL_PORT', default=587, ca...
wtreston
1

votes
2

answer
33

Views

Emailing when a instance is created or updated using Django

Intro: I have 2 Django Rest Framework models Patient and Embryo There is only 1 user who is the superuser. All the patients belong to the superuser. A patient can have many ebryo's but each embryo can have only 1 patient. What I want to do: I am trying to send the patient an email when either the pa...
MarcoBianchi
1

votes
2

answer
0

Views

Not able to pass SendGrid verification with Django

I'm currently reading a book on Django (for beginners) and I reached the point where I need to implement a password reset feature to the test website using SendGrid SMTP Relay. After creating an account and starting to create the SMTP relay I greeted with the following screen: Based on this page I...
Fozoro
1

votes
2

answer
166

Views

Export django settings to my python file

I am trying to make logparser.py in django project which parses the data coming from different servers. And on running the command on terminal : $ python logparser.py This error is coming : Traceback (most recent call last): File 'logparser.py', line 13, in SMTP_CONF = settings.SMTP_CONF File '/...
Anil Kumar Arya
1

votes
1

answer
2.8k

Views

No reverseMatch error in password reset in Django?

I have seen several posts and tried all the solutions suggested for fixing this issue. but I still have the following error. I am using Django 1.6. NoReverseMatch at /accounts/password/reset/Mw/3q6-5e4aba3a21e3b697aca2/ Reverse for 'password_reset_complete' with arguments '()' and keyword arguments...
eagertoLearn
1

votes
2

answer
1.6k

Views

Django : Send mail failed

I wrote this in terminal for test the messages sending in Django but I have a error and I don't find the solution... : from le_site.models import * import smtplib send_mail('Subject here', 'Here is the message.','[email protected]',['[email protected]'],fail_silently=False) The error (a exception) : Traceb...
Zoulou
1

votes
1

answer
577

Views

Django - context_processors

I´m trying to use context_processors to turn some configurations from settings.py, avaliable to my templates. I created a file with like this: from django.conf import settings def my_custom_var (request): return {'MY_CUSTOM_VAR': settings.`MY_CUSTOM_PROP`} This is my templates configuration on sett...
Edinilton
1

votes
1

answer
48

Views

How to use two different email addresses for emails sending?

I have a Django project which has two domains. domain1.com domain2.com I use Sites application to differ between those two addresses like: Welcome to {% if site.id==1 %}Domain1{% else %}Domain2 I want to be able to send messages from both emails: send_email(user, '[email protected]' if site.id==1 e...
Milano
1

votes
1

answer
23

Views

how to handle Django nested template tags

How to handle the variable inside the template tag {% %},I need to give arguments to my function send_mail_view() urls.py urlpatterns = [ path('send_mail_view///',views.send_mail_view, name='send_mail_view'), ] mailing_app/views.py def send_mail_view(request,sender_email,receiver_email,doc): email=E...
Nitish Singh
1

votes
2

answer
1.1k

Views

Mysterious issue with Django + uWSGI + send email

I'm here to write you after about 1.5 hour of hard debugging. First of all, these are the interested files: /project/app/utils.py from django.core.mail import EmailMultiAlternatives import threading class EmailThread(threading.Thread): def __init__(self, subject, body, from_email, recipient_list, fa...
Fred Collins
1

votes
1

answer
2.3k

Views

How to customize email backend for EmailMultiAlternatives in Django

Background :- My email Backend is something like this: EMAIL_HOST ='smtp.gmail.com' EMAIL_PORT = 587 EMAIL_HOST_USER = '[email protected]' EMAIL_HOST_PASSWORD = 'XXX' EMAIL_USE_TLS = True Problem:- I am using EmailMultiAlternatives to send html mails. Now I want to define auth_user and auth_p...
Akamad007
1

votes
1

answer
147

Views

Send an email once object meets certain criteria

[Hopefully I entitled this post correctly] I have a (sort of) 'follow' twitter thing going on. Users can follow a company profile object, which creates a follower object. class Follower(models.Model): created = models.DateTimeField(auto_now_add=True) modified = models.DateTimeField(auto_now=True) p...
Modelesq
0

votes
0

answer
17

Views

Email in django not being sent

I have a simple django application and I am not understanding why email are not being sent In my settings file I have EMAIL_USE_TLS = True EMAIL_HOST = 'smtp.gmail.com' EMAIL_PORT = 587 EMAIL_HOST_USER = '[email protected]' EMAIL_HOST_PASSWORD = 'Mypassword' DEFAULT_FROM_EMAIL = 'From Email' but repl...
Augusto Peres
1

votes
1

answer
102

Views

Django send_mail does not work with mailgun

Settings: EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' EMAIL_HOST = 'smtp.mailgun.org' EMAIL_PORT = 587 EMAIL_HOST_USER = '[email protected]' EMAIL_HOST_PASSWORD = 'passwordsecret' EMAIL_USE_TLS = True DEFAULT_FROM_EMAIL = '[email protected]' SITE_ID = 2 Output...
Kamil Septio Trojnar
0

votes
1

answer
8

Views

Django smpt email backend slowing down performance

I'm developing/serving currently locally. I'm using django-admin for internal users to add items. I add in my signal code. My signal is post_save and it's purpose is to send an email to a user for approval. I test my signal using console.EmailBackend EMAIL_BACKEND = 'django.core.mail.backends.consol...
Rach Odwyer
1

votes
1

answer
0

Views

Django Oscar user verification email

I have a simple installation of Django Oscar project. I would like to know how to send user verification email so that all new users registered email IDs can be verified? By default Oscar registers new users and sends registration email to users.
abi crazieeee
1

votes
2

answer
1.1k

Views

Django - Attach PDF generated by a view to an email

This question has some elements here, but no final answer. There is view generating a PDF with easy_pdf from easy_pdf.views import PDFTemplateResponseMixin class PostPDFDetailView(PDFTemplateResponseMixin,DetailView): model = models.Post template_name = 'post/post_pdf.html' Then, I want to attach th...
Aurélien
1

votes
2

answer
2.8k

Views

ValueError: need more than 1 value to unpack, django email error

I'm trying to use django to send emails to a bunch of people at the same time (although right now, I'm trying to get it to work with only one). I have a class called User that has a field email and a foreign-key to a class called Group. Now, I'm trying to send an email to all users in a specific gro...
1

votes
2

answer
596

Views

Send Weekly Email Notifications to Users regarding any changes in data

What are ways to send automatic weekly email notifications to users upon any update or changes in the data in a django project ?
Praneeth
1

votes
1

answer
555

Views

Request repr() unavailable in Django 500 error email: how do I debug how to get the full stack trace?

Normally the django 'mail_admins' logging handler will email you 500 errors to ADMINS along with a useful stacktrace of what happened. But for some reason I'm getting error emails with Request repr() unavailable at the bottom of the email! Anyone know how to figure out why this is happening? (So...
David Lam
1

votes
2

answer
153

Views

dont freeze on sending mail django

When django sends an email, it takes from a few milli-seconds to a few seconds depending upon the smtp server. So the problem that i am facing is when django starts sending email it freezes there. The user would have to wait till the mail has been sent. I was wondering if i could simply return the h...
Ninja Turtle
6

votes
3

answer
4.4k

Views

How does one send an email to 10,000 users in Django?

My Django application has 10,000 users, all with emails. I would like to send an email message to all of them say once a month. This message could have some pdf attachments. What I have tried is using an EmailMessage object to send an email to all of them. I add all users' email addresses to the bcc...
dangerChihuahua007
21

votes
3

answer
12.2k

Views

django to send AND receive email?

I have gotten quite familiar with django's email sending abilities, but I havn't seen anything about it receiving and processing emails from users. Is this functionality available? A few google searches have not turned up very promising results. Though I did find this: Receive and send emails in py...
Jiaaro
5

votes
1

answer
1.1k

Views

How to force error reporting from django management commands?

We are running custom management commands periodically on the server. Is there any way to get something like error reporting via email working for the command?
Oleksiy
2

votes
1

answer
303

Views

Django, overriding “is_authenticated()” when we have Email instead of username

I'm using the django-email-as-username app for using email rather than username for authentication, and it works like a charm. Now, in view I want to call if request.user.is_authenticated() but this method just authenticate users based upon (username+password) and not (email+password). How should I...
Soask
4

votes
2

answer
2.5k

Views

Django - email app

Could you please suggest any available app for sending & managing emails in django?
4

votes
1

answer
1.5k

Views

Attaching an ical file to a django email

There are plenty of examples of how to attach a file to an email, but I can't find an example of how to attach a MIMEBase instance. From the docs: attachments 'These can be either email.MIMEBase.MIMEBase instances, or (filename, content, mimetype) triples.' So I'm generating an iCal file in a functi...
PhoebeB
4

votes
4

answer
1.3k

Views

Django Error Reporting Email when Debug = True

Is there a way to get Django to email me error reports even though I have debug set to True? I didn't see anything in the docs. Edit: I'm on Django 1.2 if it matters. No, this isn't a production system.
Greg
12

votes
1

answer
7.1k

Views

Django email

I am using the Gmail SMTP server to send out emails from users of my website. These are the default settings in my settings.py EMAIL_HOST = 'smtp.gmail.com' EMAIL_HOST_USER = '[email protected]' EMAIL_HOST_PASSWORD = 'pwd' EMAIL_PORT = 587 EMAIL_USE_TLS = True SERVER_EMAIL = EMAIL_HOST_USER DEFAUL...
2

votes
1

answer
492

Views

Can I hash/encrypt or otherwise protect emails in my Django app from hackers?

Hoping for a simple function I can use to store emails securely and retrieve easily when required to send emails.
user2916527
6

votes
1

answer
188

Views

Using Django to send emails with AWS with a reverse DNS setup to point at a different server

I'm trying to setup Django on an AWS instance to send emails through my main website's server (non-AWS) rather than needing to use external mail services such as Mandrill, Amazon SES... etc I first setup my main server's DNS records to point a sub-domain to the aws instance's elastic IP, for example...
Ryflex
1

votes
1

answer
2.9k

Views

Django EmailMultiAlternatives sending to multiple “to” addresses

Is there a way in Django EmailMultiAlternatives that you can send to multiple 'to' addresses, without having to send it again? Have tried separating the email int the tuple by commas, but only the first recipient receives the emails.
ApPeL

View additional questions