added `global $config` to `send_mail()`. I apologize..