File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ import sendgrid
9393import os
9494from sendgrid.helpers.mail import *
9595
96- sg = sendgrid.SendGridAPIClient(apikey = os.environ.get(' SENDGRID_API_KEY' ))
96+ sg = sendgrid.SendGridAPIClient(api_key = os.environ.get(' SENDGRID_API_KEY' ))
9797from_email = Email(" test@example.com" )
9898to_email = Email(" test@example.com" )
9999subject = " Sending with SendGrid is Fun"
@@ -115,7 +115,7 @@ The following is the minimum needed code to send an email without the /mail/send
115115import sendgrid
116116import os
117117
118- sg = sendgrid.SendGridAPIClient(apikey = os.environ.get(' SENDGRID_API_KEY' ))
118+ sg = sendgrid.SendGridAPIClient(api_key = os.environ.get(' SENDGRID_API_KEY' ))
119119data = {
120120 " personalizations" : [
121121 {
@@ -149,7 +149,7 @@ print(response.headers)
149149import sendgrid
150150import os
151151
152- sg = sendgrid.SendGridAPIClient(apikey = os.environ.get(' SENDGRID_API_KEY' ))
152+ sg = sendgrid.SendGridAPIClient(api_key = os.environ.get(' SENDGRID_API_KEY' ))
153153response = sg.client.suppression.bounces.get()
154154print (response.status_code)
155155print (response.body)
@@ -162,7 +162,7 @@ print(response.headers)
162162import sendgrid
163163import os
164164
165- sg = sendgrid.SendGridAPIClient(apikey = os.environ.get(' SENDGRID_API_KEY' ))
165+ sg = sendgrid.SendGridAPIClient(api_key = os.environ.get(' SENDGRID_API_KEY' ))
166166response = sg.client._(" suppression/bounces" ).get()
167167print (response.status_code)
168168print (response.body)
You can’t perform that action at this time.
0 commit comments