atom-gmail
Use Atom to send emails through Gmail.
This is still in Alpha. It works great for me, but there are probably still bugs. I suggest sending an email to yourself before your intended recipient
Installation
First install the package by going to Settings > Install > atom-gmail
or with apm install atom-gmail
from the command line.
Then you need to download credentials from your Gmail account.
- Use this wizard to create or select a project in the Google Developers Console and automatically turn on the API. Click Continue, then Go to credentials.
- On the Add credentials to your project page, click the Cancel button.
- At the top of the page, select the OAuth consent screen tab. Select an Email address, enter a Product name if not already set, and click the Save button.
- Select the Credentials tab, click the Create credentials button and select OAuth client ID.
- Select the application type Other, enter the name "Gmail API Quickstart", and click the Create button.
- Click OK to dismiss the resulting dialog.
- Click the file download (Download JSON) button to the right of the client ID.
- Copy and paste the contents of this file to the Client Secret field in the configuration settings of this package. (I.e. Settings > atom-gmail > Client Secret)
To finish the authentication, open up the command palette (either
ctrl+shift+P or
cmd+shift+P) and select Atom Gmail: Authenticate
. It should open up a Google website in your web browser where
you'll need to sign in and approve this application. You'll then have to paste
the code Google gives you back into the input box in Atom. This step is buggy;
for me the input box disappears the first time I run Atom Gmail: Authenticate
,
but it works the second time.
Usage
Header
The metadata for the email must be written in a YAML header at the top of the
document. The initial ---
must be the first three characters of the document
and on its own line. There must be ---
on a line by itself at the end of the
YAML.
The available fields in the YAML header are:
to:
subject:
(optional)from:
(optional; by default it uses the Gmail account you've signed into.)cc:
(optional)bcc:
(optional)
For example:
---
to:
- john.smith@example.com
- johndoe@gmail.com
cc: foo@bar.org
from: me@helloworld.com
subject: This email is from Atom!
---
Content
The rest of the document should be written in standard CommonMark Markdown. See example.md for an example document, and see Markdown Extensions for a list of optional extensions to the Markdown specification.
Formatting
By default, this package applies Github Markdown styling to text. At this point, document styling cannot be changed, except for a few small tweaks exposed in the package settings.
By default Github-like styling is also applied to code; the code syntax highlighting style can be changed with the "Code highlighting style" option in the settings.
Markdown Extensions
This package uses markdown-it as its markdown parser. Therefore, any markdown-it plugin can be supported. Extension support hasn't been implemented as of March 12; add an issue to ping me about it.
Sending the Email
Open up the command palette (either
ctrl+shift+P or
cmd+shift+P) and start typing Atom Gmail: Send Email
. The fuzzy search will find the command without having to type that text
exactly.
Todo
- Mathjax support
- Attachment support
- Support replies