Skip to content

Java Email Send Client with support for DKIM, S/MIME and PGP/GPG

Notifications You must be signed in to change notification settings

hudeany/ConsoleMailer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tool for sending emails with DKIM signature and enrypted or signed content via GPG/PGP and S/MIME

Dependencies (Automatically downloaded by build job):

Usage: java -jar ConsoleMailer.jar [optional parameters] -host <host> -port <port> -user <user> -password <password> -from <from-address> -subject <subject> -to <to-address>
Example: java -jar ConsoleMailer.jar -host <hostname>:<port> -starttls -user "<username>" -password "<password>" -from [email protected] -to [email protected] -subject "Subject" -html "HtmlBody"

Mandatory parameters
  -h, -host <hostname[:port]>:             Hostname of the smtp server, optionally with port
  -port <port>:                            Port, if not included in hostname
  -u, -user "<username>":                  Username for authentification to the smtp server
  -p, -password "<password>":              Password for authentification to the smtp server
  -from "<email>":                         Email address of the sender of this email
  -s, -subject "<subject>":                Subject of this email
  -to "<emailList>":                       Receiver email address of this email. This is not mandatory if one of -cc or -bcc is used

Optional parameters
  -cfg "<filePath>":                       Using a text file including any preconfigured parameters            
  -starttls:                               STARTTLS connection security to the smtp server. Default is none
  -ssl:                                    TLS/SSL connection security to the smtp server. Default is none
  -tls:                                    TLS/SSL connection security to the smtp server. Default is none
  -ssltls:                                 TLS/SSL connection security to the smtp server. Default is none
  -c, -charset "<charsetName>":            Characterset (encoding) to be used in this email (UTF-8, ISO-8859-1, ...)
  
  -replyto:                                Reply to email address if it differs from the senders email address
  -cc "<emailList>":                       CC recipient address list
  -bcc "<emailList>":                      BCC recipient address list
  
  -bounce "<email>":                       Bounce address (Email header "Return-Path"), which will receive technical notification about the email distribution
  -notify "<email>":                       Demand a read notification of the recipient (Email header "Disposition-Notification-To")
  
  -text "<text>":                          Text content of this email
  -textfile "<filePath>":                  File containing the text content of this email
  -html "<html>":                          HTML content of this email
  -htmlfile "<filePath>":                  File containing the HTML content of this email
  
  -crypto "<crypto-type>":                 Crypto type for email signatures and encryption ("S/MIME" or "PGP")
                                             Signature with S/MIME needs:
                                               - signaturekeyfile [signaturekeypassword]
                                               - signaturecertificatefile
                                             Encryption with S/MIME needs:
                                               - encryptioncertificatefile
                                             Signature with PGP needs:
                                               - signaturekeyfile [signaturekeypassword]
                                             Encryption with PGP needs:
                                               - encryptionkeyfile

  -signaturekeyfile "<filePath>":          File containing the private key for signatures
  -signaturekeypassword "<password>":      Password for the private key if needed
  -signaturecertificatefile "<filePath>":  File containing the senders public certificate for signatures
  -signaturemethodname "<methodName>":     Signature method name (default: "SHA512withRSA" for S/MIME, "SHA512" for PGP)

  -encryptioncertificatefile "<filePath>": File containing the receivers public certificate for encryption by S/MIME
  -encryptionkeyfile "<filePath>":         File containing the receivers public key for encryption by PGP
  -encryptionmethodname "<methodName>":    Encryption method name (default: "AES256_CBC" for S/MIME, "AES256" for PGP)

  -dkimkeyfile "<filePath>":               File containing the private key for the DKIM signature
  -dkimdomain "<domainName>":              Domain name of the DKIM signature if it differs from the senders email address domain
  -dkimselector "<domainKeySelector>":     DKIM key selector of the single DKIM key available in DKIM keys in DNS system
  -dkimidentity "<identity>":              Identity to be used in DKIM signature. Default none

  -attachment "<filePath>":                Attache multiple files to this email
 
  -test:                                   Check DKIM configuration and crypto key configuration only. Does NOT send the email
  -f, -force:                              Send the email, even if there where DKIM or crypto configuration errors
  -silent:                                 Do not generate any terminal output except for hard errors, which where not overriden by "-force"
  
  -eventstart "<yyyy-MM-dd HH:mm:ss>":     Send an event invitation in iCal format with this email by setting its start time.
                                             Participants are all TO-addresses
                                             Subject
  -eventend "<yyyy-MM-dd HH:mm:ss>":       Event's end time (optional for event invitation)
  -eventlocation "<location text>":        Event's location (optional for event invitation)
  
  -verbose:                                Verbose error messages on console output

Global standalone parameters
  help:                                    Show this help manual
  version:                                 Show current local version of this tool
  update [<username> [<password>]]:        Check for online update and ask, whether an available update shell be installed.

About

Java Email Send Client with support for DKIM, S/MIME and PGP/GPG

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages