SwithMail - Send SSL SMTP email silently from command line (CLI) (.Net framework)

Submit command line tools that you find here.
Post Reply
Message
Author
User avatar
lintalist
Posts: 434
Joined: Sat Apr 19, 2014 12:52 am
Contact:

SwithMail - Send SSL SMTP email silently from command line (CLI) (.Net framework)

#1 Post by lintalist »

It has a GUI to aid with setting it up so a bit of a cross between GUI/CLI

SwithMail -- Send SSL SMTP email silently from command line (CLI), or a batch file using Exchange, Gmail, Hotmail, Yahoo! Plus, or a custom server
v2.2.4.0 - Requires .NET framework 4.6.2

Website: https://www.tbare.com/software/swithmail/
Download: https://sourceforge.net/projects/swithm ... t/download
TPFC Database entry: https://cli.portablefreeware.com/?id=567

SwithMail is a windows application that is extremely easy to use. You run the program, set up basic settings (from address, to address, smtp server info, email subject and body), click save, and you're ready to go. Now you can send email using these settings silently from the command line, a batch file, or if a windows service quits.
Usage:

SwithMail.exe [/Silent] [/ToAddress ...] [/CC ...] [/BCC ...] [/FromAddress ...] [/FromName "..."] [/Subject "..."] [/Body "..."] [/HTML true] [/Attachment "C:PathToFile.txt"] [/Param1 "Mr. Smith"] [/enc "..."]

Options:

/Silent -- [also '/s' and '/q'] send an email without any prompt.
/XML -- [also '/x'] "C:\PathToSettings.xml"
/FromAddress -- [also '/from'] email address
/FromName -- [also '/name'] name displayed
/Server -- server address - no port specified
/Port -- [also '/p'] server port - needed if /Server is used
/Username -- [also '/u'] specified different username to use when logging in with SSL / TLS
/Password [also '/pass'] password - in plain text
/SSL -- [also '/TLS'] "true" or "false" depending on if SSL / TLS is enabled
/ToAddress -- [also '/to'] email address(es); multiple separated by ';' or ','
/CC -- email address(es); multiple separated by ';' or ','
/BCC -- email address(es); multiple separated by ';' or ','
/ReplyTo -- [also '/rt'] address to set as the "Reply To" address
/Subject -- [also '/sub'] subject "in quotes"
/Body -- [also '/b'] email body "in quotes" - html tags allowed when /HTML=true
/BodyTxt -- [also '/btxt'] full path of a text file to be used as the message body.
/HTML -- "true" or "false" depending on if HTML tags are allowed in the body
/Attachment -- [also '/a'] "C:\PathToFile.txt|C:\PathTo2.txt" - separate with pipe (|) symbol
/Param{1-9} -- [also '/p{1-9}'] use %Param1% in subject or body, && replace it with this value
/Test -- use when testing from CLI. Message will appear with errors or success
/Encoding -- [also '/enc'] Specify different charset to be used (UTF8 by default)
/ReadReceipt -- [also '/rr'] Request Read Receipt (where the client acknowledges and agrees)
/DontReplace -- [also '/drnl'] Don't replace New Line with '<br />' on HTML email
/Log -- [also '/l'] Path to Log file with success and failures. Logs Date, ToAddress, and Subject. If no path is specified, the log file will be in the directory from where SwithMail is running.
/Priority -- "high" or "low" - flags message priority. Default is "normal" (no flag)
/MessageID -- [also '/mid'] Generate email header Message-ID

Global variables (use in email subject & body, and "from name"):

%now% - displays current date & time
%computername% - displays computer name
%username% - displays username of account running SwithMail

Notes:

-arguments are NOT case sensitive
-arguments can be prefaced with '/', '-' or '--'
-arguments and values MUST be separated with a space. (':' and '=' removed as of 2.0.5.0)
-arguments not specified will use option saved in settings"

Example Usage:

swithmail.exe /s /toaddress "1@mail.com;2@mail.com" /cc "cc@mail.com" /subject "here, %Param1%" /body "line 1
line 2" /html /param1 "Mr. Smith"
GUI

It has a GUI to configure and test it but from that point onwards you can use it via CLI:
04-ServerSettings.png

Post Reply