my_mail function fails unless $message is set (General)
I forgot to post an update to my original question. I finally figured out what caused my_mail to fail. I added the following line immediately before the call to the mail function and now all is well:
$message = preg_replace('/(?<!\r)\n/', "\r\n", $message);
Thanks for the help anyway!