https://github.com/screwdriver-cd/notifications-email
Sends email notifications on certain build events.
https://github.com/screwdriver-cd/notifications-email
Last synced: 11 months ago
JSON representation
Sends email notifications on certain build events.
- Host: GitHub
- URL: https://github.com/screwdriver-cd/notifications-email
- Owner: screwdriver-cd
- License: other
- Created: 2017-02-24T00:53:08.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2025-02-20T17:44:19.000Z (over 1 year ago)
- Last Synced: 2025-07-06T13:50:24.389Z (11 months ago)
- Language: JavaScript
- Homepage: https://cd.screwdriver.cd/pipelines/787
- Size: 55.7 KB
- Stars: 2
- Watchers: 16
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Notifications (Email)
[![Version][npm-image]][npm-url] ![Downloads][downloads-image] [![Build Status][status-image]][status-url] [![Open Issues][issues-image]][issues-url] ![License][license-image]
> Sends email notifications on certain build events.
## Usage
```bash
npm install screwdriver-notifications-email
```
### Initialization
The class has a variety of knobs to tweak when interacting with Email Notifications.
| Parameter | Type | Description |
| :------------- | :---- | :-------------|
| config | Object | Configuration Object |
| config.host | String | SMTP Host URL |
| config.port | Number | Port to use when connecting to SMTP |
| config.from | String | Sender email address |
| config.username | String | Optional username for SMTP |
| config.password | String | Optional password for SMTP |
The interface looks for email-specific build data:
| Parameter | Type | Description |
| :------------- | :---- | :-------------|
| buildData | Object | Build Data Object |
| buildData.status | String | Build status update for notification |
| buildData.settings | Object | Pluggable settings for each build |
| buildData.settings.email | Object | Email-specific settings |
| buildData.pipelineName | String | Name of your pipeline |
| buildData.jobName | String | Job this email is being sent for |
| buildData.buildId | Number | Build number this email is being sent for |
| buildData.buildLink | String | Link to build |
buildData.settings.email can take either:
#### Simple Configuration
```js
buildData.settings.email = 'notify.me@email.com'
```
#### Advanced Configuration
```js
buildData.settings.email = {
addresses: ['notify.me@email.com', 'notify.you@email.com'], // Multiple recipient addresses
statuses: ['SUCCESS', 'FAILURE'] // Build statuses to notify addresses about
}
```
## Testing
```bash
npm test
```
## License
Code licensed under the BSD 3-Clause license. See LICENSE file for terms.
[npm-image]: https://img.shields.io/npm/v/screwdriver-notifications-email.svg
[npm-url]: https://npmjs.org/package/screwdriver-notifications-email
[downloads-image]: https://img.shields.io/npm/dt/screwdriver-notifications-email.svg
[license-image]: https://img.shields.io/npm/l/screwdriver-notifications-email.svg
[issues-image]: https://img.shields.io/github/issues/screwdriver-cd/notifications-email.svg
[issues-url]: https://github.com/screwdriver-cd/notifications-email/issues
[status-image]: https://cd.screwdriver.cd/pipelines/787/badge
[status-url]: https://cd.screwdriver.cd/pipelines/787