Posts

Showing posts from March, 2014

sendmail app - GUI and CLI versions

Hello there.
I recently needed to automate a process of sending emails from MS windows machine, to lots of recipients in order to help a good friend at his work. Think of it as newsletter emails. This is why I made a small .exe file in VB.net .  I had little experience with VB.net, this is why I started from the .exe file with GUI which was easier from me to visualize and debug. To cut story short. I made it work. However, without CLI how is it possible to automate it? I know there is autoit program, but ... come on. I 'd spent quite some time to make this work. So I made a CLI version too.

The use is simple.
In  the GUI version there are listboxes to add attachments and recipients. Labels are self-explanatory so no need to say much.

The CLI version takes these arguments:
-u=[username]
-p=[password]
-s=[server]
-r=[port]
-b=[subject]
-t=[mail text]
-l=[.txt file path for recipients]
-a=[path of the attachment]
-o=[path of the txt log file to write]
--help for help
e.g. for using gmail
sendmail_cl…