org.fuin:sjsm

A simple java send mail command line application

Лицензия

Лицензия

Группа

Группа

org.fuin
Идентификатор

Идентификатор

sjsm
Последняя версия

Последняя версия

0.1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

A simple java send mail command line application
Ссылка на сайт

Ссылка на сайт

https://github.com/fuinorg/sjsm/
Организация-разработчик

Организация-разработчик

fuin.org (Germany)
Система контроля версий

Система контроля версий

https://github.com/fuinorg/sjsm/

Скачать sjsm

Как подключить последнюю версию

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

Зависимости

test (3)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12
org.assertj : assertj-core jar 3.8.0
com.github.kirviq : dumbster jar 1.7.1

Модули Проекта

Данный проект не имеет модулей.

Simple Java Send Mail (sjsm)

A simple command line application for sending mails.

Build Status Maven Central LGPLv3 License Java Development Kit 1.8

Why?

Sometimes it's nice to have a way to send an email without installing anything (except Java) on the system. For example it could be used in an AWS CodeBuild "buildspec.yml" to send a mail on a failing build. It's like sSMTP, but without a configuration file. Only command line arguments are used to configure mail server, receiver, message and other stuff.

Requirements

Make sure you have Java 8 installed on your machine.

Running the application

java -jar sjsm-0.1.0.jar <arguments>

Command line arguments

Argument Value Required Example
-host SMTPS server name yes "smtp.no-where-no-no.com"
-port SMTPS port number (SSL/TLS) yes 465
-user Your mailbox user yes "acc12345_from.not.exist" or "from.not.exist@no-where-no-no.com" (depends on your mail provider)
-pw Your mailbox password yes "xxxxxxx"
-from Sender's email address yes "from.not.exist@no-where-no-no.com"
-to Receiver's email address yes "to.not.exist@no-where-no-no.com"
-subject Mail subject yes "My subject"
-message Message body (TEXT or HTML) yes "<html><body><h1>This is a test mail</h1></body></html>"
-html - no -
-charset Mail encoding (defaults to "utf-8") no "utf-8"

TEXT example

java -jar sjsm-0.1.0.jar \
	-host "smtp.no-where-no-no.com" \
	-port 465 \
	-user "acc12345_from.not.exist" \
	-pw "xxxxxxx" \
	-from "from.not.exist@no-where-no-no.com" \
	-to "to.not.exist@no-where-no-no.com" \
	-subject "My subject" \
	-message "This is a test mail"

HTML example

java -jar sjsm-0.1.0.jar \
	-host "smtp.no-where-no-no.com" \
	-port 465 \
	-user "acc12345_from.not.exist" \
	-pw "xxxxxxx" \
	-from "from.not.exist@no-where-no-no.com" \
	-to "to.not.exist@no-where-no-no.com" \
	-subject "My html subject" \
	-message "<html><body><h1>This is a test mail</h1></body></html>" \
	-html \

CAUTION

Be aware that passing your password via the command line will most probably be visible in your command line history.


Snapshots

Snapshots can be found on the OSS Sonatype Snapshots Repository.

Add the following to your .m2/settings.xml to enable snapshots in your Maven build:

<repository>
    <id>sonatype.oss.snapshots</id>
    <name>Sonatype OSS Snapshot Repository</name>
    <url>http://oss.sonatype.org/content/repositories/snapshots</url>
    <releases>
        <enabled>false</enabled>
    </releases>
    <snapshots>
        <enabled>true</enabled>
    </snapshots>
</repository>
org.fuin

fuin.org

Версии библиотеки

Версия
0.1.0