new Email()
Email model. Extends LoopBack base [Model](#model-new-model).
Properties:
Name | Type | Description |
---|---|---|
to |
String | Email addressee. Required. |
from |
String | Email sender address. Required. |
subject |
String | Email subject string. Required. |
text |
String | Text body of email. |
html |
String | HTML body of email. |
- Source:
Methods
send()
A shortcut for Email.send(this).
- Source:
(static) send(callback)
Send an email with the given `options`.
Example Options:
```js
{
from: "Fred Foo ", // sender address
to: "bar@blurdybloop.com, baz@blurdybloop.com", // list of receivers
subject: "Hello", // Subject line
text: "Hello world", // plaintext body
html: "Hello world" // html body
}
```
See https://github.com/andris9/Nodemailer for other supported options.
Parameters:
Name | Type | Description |
---|---|---|
callback |
function | Called after the e-mail is sent or the sending failed |
Properties:
Name | Type | Description |
---|---|---|
from |
String | Senders's email address |
to |
String | List of one or more recipient email addresses (comma-delimited) |
subject |
String | Subject line |
text |
String | Body text |
html |
String | Body HTML (optional) |
- Source: