Index: invite.module =================================================================== --- invite.module (revision 2284) +++ invite.module (working copy) @@ -440,6 +440,13 @@ '#description' => t('Choose whether users should be able to customize the subject.'), '#default_value' => variable_get('invite_subject_editable', FALSE), ); + $form['email']['invite_email_format_html'] = array( + '#type' => 'radios', + '#title' => t('Email format'), + '#description' => t('Choose the format you prefer for your invitation emails.'), + '#options' => array(t('Plain text'), t('HTML')), + '#default_value' => variable_get('invite_email_format_html', FALSE), + ); $form['email']['invite_default_mail_template'] = array( '#type' => 'textarea', '#title' => t('Mail template'), @@ -1066,7 +1073,13 @@ $headers['Reply-To'] = $reply_to; } - if (!($success = drupal_mail('invite-mail', $recipient, $subject, wordwrap($body, 72), $from, $headers))) { + if (module_exists('mimemail') && variable_get('invite_email_format_html', FALSE)) { + $success = mimemail($from, $recipient, $subject, wordwrap($body, 72), FALSE, $headers); + } else { + $success = drupal_mail('invite-mail', $recipient, $subject, wordwrap($body, 72), $from, $headers); + } + + if (!$success) { static $error_shown = FALSE; if (!$error_shown) { drupal_set_message(t('Problems occurred while sending the invitation(s). Please contact the site administrator.'), 'error');