Skip to content

list index out of range #77

Open
Open
@vinay-vik

Description

@vinay-vik

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions