var Mail = ;var mail = ;mailfrom = "from";mailto = "to";mailsubject = "subject";mailhtml = "html";mail;mail ;
Installation
$ npm install caradoc-mail
Info
You need to renseign your config/params/mail.js file to use it
Mail() methods
The following are the possible fields of an e-mail message:
- from - The e-mail address of the sender. All e-mail addresses can be plain
sender@server.com
or formattedSender Name <sender@server.com>
- to - Comma separated list or an array of recipients e-mail addresses that will appear on the
To:
field - cc - Comma separated list or an array of recipients e-mail addresses that will appear on the
Cc:
field - bcc - Comma separated list or an array of recipients e-mail addresses that will appear on the
Bcc:
field - replyTo - An e-mail address that will appear on the
Reply-To:
field - subject - The subject of the e-mail
- text - The plaintext version of the message
- html - The HTML version of the message
- generateTextFromHTML - if set to true uses HTML to generate plain text body part from the HTML if the text is not defined
- headers - An object of additional header fields
{"X-Key-Name": "key value"}
(NB! values are passed as is, you should do your own encoding to 7bit and folding if needed)
License
(The MIT License)
Copyright (c) 2012-2013 g derouineau <admin@caradoc.fr>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.