How to send email in drupal I have drupal site in that ,i want to send a email to charities when donor post a donation..,and i want to send a email notification to charities,so how i send email using drupal7

$message = array(
  'to' =&gt; '"'. addslashes(mime_header_encode('new donation')) .'" &lt;test@example.com&gt;';
  'subject' =&gt; t('Example subject'),
  'body' =&gt; "&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;b&gt;Hi user! a donor added a new donaion! So please     check the site for more infomation!&lt;br/&gt;Thanks,&lt;br/&gt;&lt;/b&gt;&lt;/body&gt;&lt;/html&gt;",
  'headers' =&gt; array(
          'From' =&gt; 'test@test.org',
          'MIME-Version' =&gt; '1.0',
          'Content-Type' =&gt; 'text/html;charset=utf-8',),
);

drupal_mail_send($message);
First you must enable the following modules:

1. Mailsystem module  http://drupal.org/project/mailsystem
 2. Mimemail module http://drupal.org/project/mimemail (it contains the mail actions and sending mail function) or you can use htmlmail module  http://drupal.org/project/htmlmail
 3. Rules module http://drupal.org/project/rules

After that you will do some steps:

1. Create new rule in admin/config/workflow/rules/reaction/add and select the "React on event" is "After saving new content".
 2. Add a condition. Choose Node (Content is of type) for condition and choose your custom content type in the "Content types" list box.
 3. Add another condition.  Choose User(User has roles()). Choose data selector is "node:author" and choose the role of donor.
 4. Add the action. Choose System (Send HTML email). You'll change the To, CC, subject, content here.
 5. Try to test that.

Be sure that you can send email using your system. If you use the htmlmail module. It will have the send test email in its setting.