To send, please use server "smtp.gmail.com" and pass true for UseSSL parameter. And that's all you need for sending, because the normal SSL will be good enough.
For IMAP to receive, use URL with "imaps://imap.gmail.com" (s for SSL). And with that little change the imap example from us also works fine.
Next plugin will have an example for that.