Struct sendgrid::sg_client::SGClient [] [src]

pub struct SGClient { /* fields omitted */ }

This is the struct that allows you to authenticate to the SendGrid API. It's only field is the API key which allows you to send messages.

Methods

impl SGClient
[src]

Makes a new SendGrid cient with the specified API key.

Sends a messages through the SendGrid API. It takes a Mail struct as an argument. It returns the string response from the API as JSON. It sets the Content-Type to be application/x-www-form-urlencoded.