How to fix error : no module named sendgrid when try to use sendgrid python lib in PHP.
"no module named sendgrid" error reported with below codes: <?php system("/usr/bin/python sendmail.py 2>&1"); system("/usr/bin/python --version 2>&1", $ret); ?> sendmail.py import sendgrid import os from sendgrid.helpers.mail import * sg = sendgrid.SendGridAPIClient( apikey = os.environ.get( ' SENDGRID_API_KEY ' )) from_email = Email( " test@example.com " ) to_email = Email( " test@example.com " ) subject = " Sending with SendGrid is Fun " content = Content( " text/plain " , " and easy to do anywhere, even with Python " ) mail = Mail(from_email, subject, to_email, content) response = sg.client.mail.send.post( request_body = mail.get()) print (response.status_code) print (response.body) print (response.headers) ....
Okay...
ReplyDeleteThis might sound a little weird, maybe even kind of "out there"....
HOW would you like it if you could just click "PLAY" to listen to a short, "magical tone"...
And miraculously attract MORE MONEY into your LIFE?
What I'm talking about is BIG MONEY, even MILLIONS of DOLLARS!
Do you think it's too EASY? Think this couldn't possibly be for REAL?!?
Well then, I've got news for you...
Sometimes the most significant blessings in life are the easiest to RECEIVE!
In fact, I will PROVE it to you by allowing you to PLAY a REAL "magical wealth building tone" I've produced...
YOU just hit "PLAY" and the money will start coming into your life. starting pretty much right away.
CLICK here now to experience this magical "Miracle Money-Magnet Sound Frequency" - it's my gift to you!