GithubHelp home page GithubHelp logo

bahamut1797 / javasmtpstandaloneservice Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 11 KB

This is a Java SMTP Service that was made it as an alternative use of local SMTP commands.

License: MIT License

Java 100.00%
java java-7-compatible smtp smtp-mail

javasmtpstandaloneservice's Introduction

Java SMTP Standalone Service

This SMTP Service was made as an alternative use of local SMTP commands, like when your application server hasn't commands to execute a SMTP service or you don't had permission to install 3rd party software.

How to run

This is a simple Java Standalone application, so you only need Java 1.7+ installed on your environment to execute it. The command to do it is the next:

java -jar <pathToJar>/JavaSMTPService.jar

By default the jar search for the default configuration file called "defaultSMTP.conf", to create it use the next command and set all information needed to call a SMTP Service:

java -jar <pathToJar>/JavaSMTPService.jar configure

In case you want to use your own configuration file you have to send the path of the file ypu want to use:

java -jar <pathToJar>/JavaSMTPService.jar /path/to/configure/file.conf

Make a Configure File

If you don't want to use the command to make a configure file, you have to respect the next structure of the file:

  • SMTP_HOST PORT
  • TO_EMAIL,TO_EMAIL2,...<space>[TO_EMAIL_CC,TO_EMAIL_CC2,...]<space>[TO_EMAIL_BCC,TO_EMAIL_BCC2,...]
  • FROM_EMAIL PASSWORD
  • TLS|SSL|NONE <= Only one of this options
  • FROM_NAME
  • SUBJECT
  • BODY_MESSAGE
  • [ATTACHMENT,ATTACHMENT2,...]

NOTE: Attributes in brackets [ ] are optional.

How it works

You need to execute the jar from the application you need to use a SMTP service, the jar will read the configuration file and invoke a SMTP service inside and send the email with the registered information inside the file. The jar will return an exit code 0 if email was successfully send it or an error code and message error like this:

  • 101 - File not found.
  • 102 - I/O Error.
  • 103 - Mail not sent + error msg.

javasmtpstandaloneservice's People

Contributors

bahamut1797 avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

oswaldol

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.