#100DaysOfWeb in Python Transcripts
Chapter: Days 65-68: Heroku and Python Platform-as-a-Service
Lecture: Heroku SendGrid addon setup

Login or purchase this course to watch this video and the rest of the course contents.
0:00 While we're on the topic of email let's look at another add-on for Heroku called SendGrid. This is a really simple add-on, it's just sending emails
0:10 but in a much more structured way than the Gmail way we looked at prior. This is actually more of a marketing thing so something very useful
0:18 if you have your own little business or webstore or blog, whatever. What'd I'd like you to do is in the add-on section
0:26 search for SendGrid and you'll see it there SendGrid right there. Install that, use the free tier, the free provision
0:35 and then, you'll get your little button down here for SendGrid. Click on that. This will actually log you into SendGrid itself
0:44 so it sort of redirects you away from Heroku. But the special thing is that it takes your Heroku app that you've created and uses that app
0:54 and the login details that you've used for Heroku to create a sort of account on SendGrid and that's what you use to send your emails.
1:05 You don't actually need to configure anything else. What you can then do, on the left is scroll down to settings, expand that out
1:13 click on API keys, and then, create an API key. On this screen, the first thing we want to do is click on API key name here and throw it a name.
1:25 Just come up with something random we can call it SendGrid test and then, we are going to click on full access. Now, full access allows this API key
1:41 or anything using this key to get full access to the account. We don't care about that just for now. You can look into the restricted access
1:50 that you may want later. For now, just to demonstrate we are going to use the full access. And scroll down and then, click on create and view.
2:00 When you get your API key make sure you save it somewhere secure and that's why I'm not clicking the button now. Once you have it, save it
2:10 because we are going to use that in the next video. Before we finish this video we'll bring up our actual code here our little repository of our app
2:21 and we're going to launch the virtual environment and then, we're going to pip install SendGrid. And what we need to do is actual
2:29 we need to push this install of SendGrid this package up to Heroku, so pip install sendgrid. And then, we can just put that into requirements
2:48 so delete the existing requirements just to make it easier. pip freeze > requirements.txt. We can cap that. And there we have SendGrid in there.
3:06 And with that done, we can then do our git add. Let's just deactivate just to be sure. Git add . git commit. pip install sendgrid.
3:24 And then, we can do a git push Heroku master and that will push the SendGrid files off to our Heroku diner, to our little repository in Heroku.
3:37 And then, in the next video, we can actually get coding. There's not too much to the code, it's quite simple.
3:43 And then, we can send an email using SendGrid.


Talk Python's Mastodon Michael Kennedy's Mastodon