question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mail configuration / Adapters

See original GitHub issue

We haven’t yet got a plan for handling mail config with Ghost-CLI.

Short term, this will need to be a configuration task. It may also be worth adding a line at the end of ghost install telling users to read a page on configuration, which covers the stuff ghost-cli doesn’t do yet, like nginx client_max_body_size and mail.


Whilst we’re here, I thought I’d write down my long term idea somewhere to percolate on:

Long term, my original thought was that we would upgrade nodemailer to the new version where different kinds of mail handling are separate, and that we would use our concept of adapters to make it possible to override the default mail adapter.

Alternatively we could do a similar thing, using adapters and then use modules like mailgun-js directly instead of going through nodemailer.

Install process

Either way, we’d need some concept in ghost-cli of being able to run a command to add an adapter. Adapters would be npm modules which follow some pattern or convention.

E.g.

ghost adapter type name or ghost adapter npm-module-name ghost adapter mail smtp or ghost adapter ghost-mail-adapter-smtp

One idea would be to read the package.json file for the module, to verify the module is something that Ghost-CLI can understand. We already did this in the Casper package.json: https://github.com/TryGhost/Casper/blob/master/package.json#L19 with the gpm key.

Config

An adapter would probably need to provide it’s own config requirements. E.g. mailgun-js needs a domain and api key whereas the nodemailer mailgun thing has a standard format that looks more similar to SMTP config. Perhaps this is speced in a special format, maybe in the package.json, etc, or maybe all Adapters expose a function for this… many things are possible.

Enable/disable

It may be necessary to have a set of adapter commands rather than a single one:

ghost adapter install ghost-mail-adapter-smtp ghost adapter enable ghost-mail-adapter-smtp ghost adapter config ghost-mail-adapter-smtp ghost adapter disable ghost-mail-adapter-smtp

This is just a brain dump for now!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ErisDScommented, Jun 26, 2017

Yar, I mainly wrote it because I totally forgot that ghost-cli doesn’t do any mail config. Short term anything goes, long term mail should probably be adapters, which needs work in Ghost as well.

Have done 4 successful beta.1 -> beta.2 updates btw 🎉

1reaction
acburdinecommented, Jun 26, 2017

Some of this is related to #49 as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuring the Mail Adapter - SAP Help Portal
Create a Communication Channel in the Integration Directory. · To configure the adapter, select the Parameters tab page. · Select MAIL as the...
Read more >
B2B Mail Client Adapter - IBM
The B2B Mail Client adapter collects mail from an RFC 1725-compliant mail server, locates an appropriate business process or contract, and start a...
Read more >
Configuring and Running the Sample Adapters
The Sample E-Mail Adapter is an eLink to application adapter that consists of a Tuxedo client and server. The E-Mail Adapter's SEND service...
Read more >
Sending Email with the SMTP Adapter - Peregrine Connect
Neuron ESB can send emails over the SMTP protocol. Neuron SMTP Adapter endpoints subscribe to messages from the ESB, converts them into an...
Read more >
Using the Email Inbound Adapter - InterSystems Documentation
Add an instance of your custom business service class to the production. · Enable the business service. · Configure the adapter to access...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found