Updating an example to use Gmail

In any one of the GoMail example apps, you'll need to edit the main server setup in main.go. Replace the server initiation by changing client.NewTestServer() to client.NewGMailServer(). With the credentials.json file in place, running this new code will obtain a connection to your Gmail account for reading and sending emails. Note that, for this example, you'll need to run from the command line and follow the OAuth2 setup steps. To make a better user experience, you can provide a more sophisticated implementation of the getTokenFromWeb() function.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.26.217