Fix for Code

  1. /*
  2.  * Implementatino of hook_mail().
  3.  */
  4. function misc_mail($key, &$message, $params) {
  5.   $language->message['language'];
  6.   switch($key) {
  7.     case 'make_an_offer':
  8.       $message['subject'] = t('testing');
  9.       $message['body'] = t('Better Work ' . $params['location']);
  10.       $message['from'] = $params['from'];
  11.       break;
  12.   }
  13. }
  14.  
  15. /*
  16.  * misc_make_offer_form submit function.
  17.  */
  18. function misc_make_offer_form_submit($form, &$form_state) {
  19.   $params = array(
  20.     'location' => $form['real_estate_property']['#value'],
  21.     'from' => $form['email']['#value'],
  22.   );
  23.  
  24.   // Call drupal_mail function and send email
  25.   drupal_mail(
  26.     'misc',
  27.     'make_an_offer',
  28.     'steven@meridian-ds.com',
  29.     $params,
  30.     $send = TRUE
  31.   );
  32. }

Submit Fix

Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Select the syntax highlighting mode to use.