it's working
close the smtp client when done sending
moved mailing code to lib/mailr