Open vinay-vik opened 7 years ago
I have written a code to generate mails for multiple recipients using the following code.
sendGridEmail = SendGridEmailMultiAlternatives(subject,message,from_email,recipient_list) sendGridEmail.attach_alternative(mail_content, "text/html") sendGridEmail.sendgrid_headers.addTo(to_send_email_list) sendGridEmail.sendgrid_headers.addSubVal('%investor%', name_list) sendGridEmail.update_headers() response = sendGridEmail.send()
where recipient_list is empty and I want to update recipient_list using sendgrid_headers.addTo(to_send_email_list). I am not able to send mail because of empty list(recipient_list). Is there any way to update sendgrid_headers.addTo and send mails.
Thanks
I have written a code to generate mails for multiple recipients using the following code.
sendGridEmail = SendGridEmailMultiAlternatives(subject,message,from_email,recipient_list) sendGridEmail.attach_alternative(mail_content, "text/html") sendGridEmail.sendgrid_headers.addTo(to_send_email_list) sendGridEmail.sendgrid_headers.addSubVal('%investor%', name_list) sendGridEmail.update_headers() response = sendGridEmail.send()
where recipient_list is empty and I want to update recipient_list using sendgrid_headers.addTo(to_send_email_list). I am not able to send mail because of empty list(recipient_list). Is there any way to update sendgrid_headers.addTo and send mails.
Thanks