drupal_mail_system is returning empty object
You forgot to call format method.

Try the following snippet:

$from = variable_get('system_mail', $my_email);
$message = array(
  'id' =&gt; $my_module . '_' . $my_mail_token,
  'to' =&gt; $my_email,
  'subject' =&gt; $message_subject,
  'body' =&gt; array($message_body),
  'headers' =&gt; array(
    'From' =&gt; $from,
    'Sender' =&gt; $from,
    'Return-Path' =&gt; $from,
  ),
);
$system = drupal_mail_system($my_module, $my_mail_token);

// The format function must be called before calling the mail function. 
$message = $system-&gt;format($message);

if ($system-&gt;mail($message)) {
  drupal_set_message('SUCCESS');
}
else {
  drupal_set_message('FAILURE');
}