hoodiehq-archive / hoodie-plugins-api

:no_entry: part of hoodie-server now
http://github.com/hoodiehq/hoodie-server
Apache License 2.0
13 stars 5 forks source link

how to send emails? #13

Closed gr2m closed 11 years ago

gr2m commented 11 years ago

we agreed on providing an API to send emails, right? Do we have that yet?

caolan commented 11 years ago

Needs adding, something like this ok?

hoodie.sendEmail({
  to: "foo@bar.com",
  from: "me@example.com",
  subject: "blah",
  body: "blah blah blah..."
});

The host/port/domain/auth details will be fetched from the global config which will need setting up through pocket.

gr2m commented 11 years ago

yes, sounds great!

Can we do text instead of body, so that we could pass an optional html property, to send a multipart email? I think that's also Nodemailer's API, I'd just follow it, if you don't see any problems with it

caolan commented 11 years ago

yeah, I was planning to just follow the node-mailer API but prefill some values from hoodie global config...

On 5 August 2013 13:52, Gregor Martynus notifications@github.com wrote:

yes, sounds great!

Can we do text instead of body, so that we could pass an optional htmlproperty, to send a multipart email? I think that's also Nodemailer's API, I'd just follow it, if you don't see any problems with it

— Reply to this email directly or view it on GitHubhttps://github.com/hoodiehq/hoodie-plugins-api/issues/13#issuecomment-22103944 .

caolan commented 11 years ago

should we make plugins specify the "from" property?

gr2m commented 11 years ago

I'd set a default, but I'd allow plugins to overwrite it.

caolan commented 11 years ago

Added in hoodie-plugins-manager: https://github.com/hoodiehq/hoodie-plugins-manager/commit/e30db24f96db4854dfcf537c211cdd86d5931a06

gr2m commented 11 years ago

AWESOME!