Loading risefor_lobbying/models.py +6 −4 Original line number Diff line number Diff line Loading @@ -580,8 +580,8 @@ def send_email_on_contacteo(sender, instance, created, **kwargs): @receiver(post_save, sender=HomePageElectedOfficals) def send_email_on_HomePageElectedOfficals(sender, instance, created, **kwargs): if created: teamEmail = "community@free-the-tree.org" key = ['key0','From'] #teamEmail = "test@test.com" key = [' ','De la part '] body = { key[0] : instance.emailContent, key[1] : instance.firstname + " " + instance.lastname, Loading @@ -593,9 +593,11 @@ def send_email_on_HomePageElectedOfficals(sender, instance, created, **kwargs): email = EmailMessage( instance.emailSubject + " " + instance.firstname + " "+ instance.lastname, content, instance.userEmail,#here is from value to=[instance.electedEmails], cc=[instance.userEmail,teamEmail], reply_to=[instance.userEmail,teamEmail], cc=[instance.userEmail], reply_to=[instance.userEmail], #from=[instance.userEmail], ) #email.attach_file('./static/img/ATTESTATION-DE-SORTIE-DE-CRISE-DÉROGATOIRE.pdf') email.send() Loading Loading
risefor_lobbying/models.py +6 −4 Original line number Diff line number Diff line Loading @@ -580,8 +580,8 @@ def send_email_on_contacteo(sender, instance, created, **kwargs): @receiver(post_save, sender=HomePageElectedOfficals) def send_email_on_HomePageElectedOfficals(sender, instance, created, **kwargs): if created: teamEmail = "community@free-the-tree.org" key = ['key0','From'] #teamEmail = "test@test.com" key = [' ','De la part '] body = { key[0] : instance.emailContent, key[1] : instance.firstname + " " + instance.lastname, Loading @@ -593,9 +593,11 @@ def send_email_on_HomePageElectedOfficals(sender, instance, created, **kwargs): email = EmailMessage( instance.emailSubject + " " + instance.firstname + " "+ instance.lastname, content, instance.userEmail,#here is from value to=[instance.electedEmails], cc=[instance.userEmail,teamEmail], reply_to=[instance.userEmail,teamEmail], cc=[instance.userEmail], reply_to=[instance.userEmail], #from=[instance.userEmail], ) #email.attach_file('./static/img/ATTESTATION-DE-SORTIE-DE-CRISE-DÉROGATOIRE.pdf') email.send() Loading