I did give a valid email id.  The example below just does not show it but within the actually module I do have a valid email address.

John

On Thu, Mar 31, 2011 at 6:55 AM, Vaibhav Jain <in.vaibhavjain@gmail.com> wrote:
This according to me should not give error,
Try giving a valid email id and then see what happens

On Thu, Mar 31, 2011 at 4:14 PM, John Mitchell <mitchelljj98@gmail.com> wrote:
Within a custom module I am trying to send the below so that an email is sent but I get the error The submitted from address () is not valid.  This from email address does exist so why is it giving me this error?

Thanks,

John

$message = array(
  'to' => 'username1@domain123.com',
  'subject' => t('Example subject'),
  'body' => t('Example body'),
  'headers' => array('From' => 'support@domain123.com'),
);
drupal_mail_send($message);


--
John J. Mitchell

--
[ Drupal support list | http://lists.drupal.org/ ]



--
Regards,
Vaibhav Jain

--
[ Drupal support list | http://lists.drupal.org/ ]



--
John J. Mitchell