Fixes #33. The "message" element in "mailformat" needs to be the last entry. Otherwise the elements following "message" after sorting get included in the body of the message. I've saved the value for "message", removed it from the hash, let the sort happen on the remaining elements, then append the saved message to the mailformat block before closing.
I've tested on my systems both supplying a custom message to the module and supplying no message to the module.
Fixes #33. The "message" element in "mailformat" needs to be the last entry. Otherwise the elements following "message" after sorting get included in the body of the message. I've saved the value for "message", removed it from the hash, let the sort happen on the remaining elements, then append the saved message to the mailformat block before closing.
I've tested on my systems both supplying a custom message to the module and supplying no message to the module.