My Mac has Mono

Through an odd series of events beginning with the announcement of a new release of the F# programming language, I ended up installing the Mono system on my Mac.

I had been in the business of selling a command-line mailer that I later ported to C#.  I quit selling the program (MailWrench) and made its source available under the MIT/X11 license.  I have just recompiled MailWrench under OS/X using Mono.

It works! I had written a smaller command-line emailer in Go (Golang) so that I could run the same program on OS/X and Windows. It appears that I can fall back to using MailWrench.

Please note that I haven’t updated the Github repo for MailWrench, yet.

If you use the current 2.0 Github source, you’ll have to take out imports that reference System.Drawing and System.Windows.Forms … they’re not used, but I hadn’t realized they were in the code until I tried to compile under Mono. I’ll be changing the source code soon enough so that Windows, Mac, and Linux editions will all sport their own OS-specific identifier in the program’s output.

To build MailWrench on the Mac, issue this command.

mcs mailwrench.cs

I was going to send mail via GMail, so I had to update the certs in the Mono system. I issued these commands:

mozroots –import –ask-remove


certmgr -ssl smtps://

…answering positively to the prompts.

I would like to statically link the LGPL’ed runtimes so that I can create a pure OS/X binary. I had hoped that this commmand:

mkbundle –static mailwrench.exe -o mailwrench

…would yield an OS/X binary. However, there appear to be some libraries that I have to install, first. That’s a task for another day.

I issued a test MailWrench command:

mono mailwrench.exe -to -from -s “test subject” -msg “This is a test” -id -password mypassword -ssl -smtp -port 587

( The above was entered into a shell script …)

The output that I got to see was something I didn’t think I’d ever see outside of Windows:


I  received the email:

Screen Shot 2013-12-03 at 8.56.59 PM

More later.


About Jim Lawless

I've been programming computers for about 36 years ... 30 of that professionally. I've been a teacher, I've worked as a consultant, and have written articles here and there for publications like Dr. Dobbs Journal, The C/C++ Users Journal, Nuts and Volts, and others.
This entry was posted in Programming and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s