title: how to send email in drupal 7
body: <p>Does any can help with an example source code to send email in drupal 7.
     Can any one help with the contact_submit function to use <strong>drupal_mail()</strong>.
     I'm using custom module :</p>
  
  <pre><code>function contact_menu() {
    $items['contact'] = array(
      'title' =&gt; 'contact form',
      'page callback' =&gt; 'drupal_get_form',
      'page arguments' =&gt; array('contact_form'),
      'access arguments' =&gt; array('access content'),
    );
  
    return $items;
  }
  
  function contact_form() {
    $form['intro'] = array(
      '#markup' =&gt; t('Use this form to send a message to an e-mail address. No spamming!'),
    );
    $form['email'] = array(
      '#type' =&gt; 'textfield',
      '#title' =&gt; t('E-mail address'),
      '#required' =&gt; TRUE,
    );
    $form['message'] = array(
      '#type' =&gt; 'textarea',
      '#title' =&gt; t('Message'),
      '#required' =&gt; TRUE,
    );
    $form['submit'] = array(
      '#type' =&gt; 'submit',
      '#value' =&gt; t('Submit'),
    );
  
    return $form;
  }
  
      function contact_validate($form, &amp;$form_state) {
        if (!valid_email_address($form_state['values']['email'])) {
          form_set_error('email', t('That e-mail address is not valid.'));
        }
      }
  function contact_form_submit($form, &amp;$form_state) {
  //What i should write here ???
  }
  </code></pre>