It is often useful to run this app without GUI, particularly on Linux. Use the following steps to accomplish this task.
/opt/EmailSender
java -jar EmailSender.jar -console
java -jar EmailSender.jar -console -subject hello -recipient your.friend@yourServer.com -sender you@yourServer.com -srv mail.yourserver.com -useJM falseThe above example will send an email from
you@yourserver.com
to your.friend@yourserver.com
through mail.yourserver.com
as the SMTP server. It will also display the SMTP conversation log on the console window.
When connecting to an SMTP server on the Internet, you may have to specify a fully qualified domain name (FQDN) in the SMTP HELO greeting. Some remote SMTP servers may disconnect the socket if this value is not correctly specified. Email Sender tries to determine FQDN of the machine where it is running. However, many computers are configured to return FQDN for their hostnames. This causes an incorrect value in the HELO greeting.
Use the following command line to explicitly specify a FQDN for HELO greeting.
java -Dmail.smtp.localhost=your.example.com -jar EmailSender.jar