notify-email

Notify events in your application as emails

License

License

Categories

Categories

Ant Build Tools
GroupId

GroupId

in.ashwanthkumar
ArtifactId

ArtifactId

notify-email
Last Version

Last Version

1.0-rc3
Release Date

Release Date

Type

Type

jar
Description

Description

notify-email
Notify events in your application as emails

Download notify-email

How to add to project

<!-- https://jarcasting.com/artifacts/in.ashwanthkumar/notify-email/ -->
<dependency>
    <groupId>in.ashwanthkumar</groupId>
    <artifactId>notify-email</artifactId>
    <version>1.0-rc3</version>
</dependency>
// https://jarcasting.com/artifacts/in.ashwanthkumar/notify-email/
implementation 'in.ashwanthkumar:notify-email:1.0-rc3'
// https://jarcasting.com/artifacts/in.ashwanthkumar/notify-email/
implementation ("in.ashwanthkumar:notify-email:1.0-rc3")
'in.ashwanthkumar:notify-email:jar:1.0-rc3'
<dependency org="in.ashwanthkumar" name="notify-email" rev="1.0-rc3">
  <artifact name="notify-email" type="jar" />
</dependency>
@Grapes(
@Grab(group='in.ashwanthkumar', module='notify-email', version='1.0-rc3')
)
libraryDependencies += "in.ashwanthkumar" % "notify-email" % "1.0-rc3"
[in.ashwanthkumar/notify-email "1.0-rc3"]

Dependencies

compile (3)

Group / Artifact Type Version
in.ashwanthkumar : notify-core jar 1.0-rc3
org.apache.commons : commons-email jar 1.4
com.typesafe : config jar 1.2.1

test (3)

Group / Artifact Type Version
junit : junit jar 4.12
org.hamcrest : hamcrest-all jar 1.3
org.mockito : mockito-all jar 1.10.19

Project Modules

There are no modules declared in this project.

Notify

Collection of libraries that I used for notification across various means.

Latest Project version - 1.0-rc3 (published on Maven Central)

Integrations and Usage

Add the notify-core to your project and choose the required integration.

<dependency>
    <groupId>in.ashwanthkumar</groupId>
    <artifactId>notify-core</artifactId>
    <version>${project.version}</version>
</dependency>

Slack

<dependency>
    <groupId>in.ashwanthkumar</groupId>
    <artifactId>notify-slack</artifactId>
    <version>${project.version}</version>
</dependency>
Notifier notifier = new BasicSlackNotifier(new Slack("slack_webhook_url").sendToChannel("general"));
notifier.notify("Hello World from Notify :smile:");

or you can initialize from HOCON configurations

# slack-notify.conf
notify {
  type = "slack"
  webhook-url = "https://hooks.slack.com/services/foo/bar/baz"
  # Optional fields
  channel = "general" # or user = "david"
  botname = "notifier"
  icon = ":sunglasses:"
}
Config config = ConfigFactory.parseResources("slack-notify.conf").getConfig("notify");
Notifier notifier = SlackNotifierFactory.load(config);
notifier.notify("Hello World from Notify :smile:");

EMail

<dependency>
    <groupId>in.ashwanthkumar</groupId>
    <artifactId>notify-email</artifactId>
    <version>${project.version}</version>
</dependency>
Notifier notifier = new SimpleEmailNotifier(new GMailConfig("[email protected]", "[email protected]", "Email Subject", "username", "password"));
notifier.notify("Hello World from Notify :smile:");

PagerDuty

Note - As of now, we can only trigger incidents on PagerDuty not resolve them.

<dependency>
    <groupId>in.ashwanthkumar</groupId>
    <artifactId>notify-pagerduty</artifactId>
    <version>${project.version}</version>
</dependency>
Notifier notifier = new SimplePDNotifier("API_KEY");
notifier.notify("Hello World from Notify :smile:");

License

Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0

Versions

Version
1.0-rc3
1.0-rc2
1.0-rc1