Send emails from ioBroker.
The whole job makes nodemailer and ioBroker just use it.
This Adapter requires nodejs 6.x or higher!!
To use Gmail you may need to configure "Allow Less Secure Apps" in your Gmail account unless you are using 2FA in which case you would have to create an Application Specific password. You also may need to unlock your account with "Allow access to your Google account" to use SMTP.
To send email from ScriptEngine just write:
// send email to all instances of email adapter
sendTo("email", "Email body");
// send email to specific instance of email adapter
sendTo("email.1", "Email body");
// To specify subject or other options
sendTo("email", {
from: "iobroker@mydomain.com",
to: "aabbcc@gmail.com",
subject: "Message from ioBroker",
text: "This is test email to you!"
});
// To send attachments
sendTo("email", {
attachments: [
// use file on disk as attachment
{path: "/pathToImage/picture1.jpg"},
{ // use URL as an attachment
filename: 'license.txt',
path: 'https://raw.github.com/andris9/Nodemailer/master/LICENSE'
}
]
});
// To send in html format
sendTo("email", {
html: "<p>Embedded image: <img src='cid:image1'/></p>",
attachments:[
{path: "path/to/file/image1.jpg", cid: "image1"}
]
});
To send email from other adapter use adapter.sendTo function.
- 1und1
- AOL
- DebugMail.io
- DynectEmail
- FastMail
- GandiMail
- Gmail
- Godaddy
- GodaddyAsia
- GodaddyEurope
- hot.ee
- Hotmail
- iCloud
- ith
- mail.ee
- Mail.ru
- Mailgun
- Mailjet
- Mandrill
- Naver
- Office365
- OpenMailBox
- Postmark
- QQex
- SendCloud
- SendGrid
- SES
- SES-US-EAST-1
- SES-US-WEST-2
- SES-EU-WEST-1
- Sparkpost
- Yahoo
- Yandex
- Zoho
- User specific (Server, port and security defined manually)
For other services see documentation of Nodemailer: [https://github.com/nodemailer/nodemailer](https://github.com/nodemailer/nodemailer)
- (Apollon77/bluefox) js-controller 2.0 compatibility, dependency updates
- (skraw.iobroker) Add ith
- (bluefox) fix blockly
- (bluefox) Admin3 ready
- (instalator) fix translations
- (bluefox) add Office365
- (bluefox) support of blockly
- (bluefox) fix sending emails after first one
- (bluefox) filter out double messages
- (bluefox) use new nodemailer packet
- (bluefox) fix settings if "user defined" was selected
- (bluefox) update configuration page and decode errors
- (bluefox) prepare npm
(bluefox) support of new naming concept
- (bluefox) support of daemon mode
- (bluefox) add Gruntfile.js
The MIT License (MIT)
Copyright (c) 2014-2019 bluefox
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.