Commits

ro...@localhost.localdomain  committed ed4126d Merge

merged

  • Participants
  • Parent commits 3925f8f, a25f355

Comments (0)

Files changed (1)

File web/views.py

         pass
     return user.username.last_name+' '+fname
 
-@menu_enabled("Send bulk mail")
+
 @user_passes_test(lambda u: isingroup(u,'committee') == True,login_url="/login/") 
 def bulkmail(request,sstr=''):
     """
             if 'del' in request.POST.keys():
                 lst = Delegate.objects.all()
                 emaillist = [x.username for x in lst]
-            frm = settings.DEFAULT_FROM_EMAIL
+            frm = 'contact@in.pycon.org'
+            
             for user in emaillist:
                 salute = ''
                 try:
                 msg = salute+message+greet+url
                 send_id = [user.email]
                 emailmsg = EmailMessage(subject,msg,frm,send_id)
-                emailmsg.send()
+                try:
+                    mailmsg.send()
+                except:
+                    pass
             return HttpResponseRedirect("/bulkmail/")
     else:
         form = Bulkmailform(sstr)