Adds bcc to emails sent from server
This commit is contained in:
		
							parent
							
								
									7225dcd660
								
							
						
					
					
						commit
						073174e617
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
					@ -24,7 +24,8 @@ def send_email(to, kind, **kwargs):
 | 
				
			||||||
    message_plaintext = strip_tags(message_html)
 | 
					    message_plaintext = strip_tags(message_html)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    from_email = settings.DEFAULT_FROM_EMAIL
 | 
					    from_email = settings.DEFAULT_FROM_EMAIL
 | 
				
			||||||
 | 
					    bcc_email = settings.ENVELOPE_BCC_LIST
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    email = EmailMultiAlternatives(subject, message_plaintext, from_email, to)
 | 
					    email = EmailMultiAlternatives(subject, message_plaintext, from_email, to, bcc=bcc_email)
 | 
				
			||||||
    email.attach_alternative(message_html, "text/html")
 | 
					    email.attach_alternative(message_html, "text/html")
 | 
				
			||||||
    email.send()
 | 
					    email.send()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue