I'd like to be able to set the default message format from plain text to either Filtered HTML or Full HTML.

I've found the variable at line 166 of views_send.module:
$form['mail']['format'] = _views_send_filter_form(variable_get('views_send_message_format_'. $display, VIEWS_SEND_FORMAT_PLAIN));

I haven't been able to determine what values can be used to substitute for 'VIEWS_SEND_FORMAT_PLAIN'.

Any help appreciated.

Comments

PascalAnimateur’s picture

Here's what I use in a custom module (I made it by exporting my view with features) to set the default To: (and hide the collapsible fieldset) and change the default message format.
You'll have to change the $form_id to match the name of your view.

function mass_html_email_form_alter(&$form, &$form_state, $form_id) {
  global $user;
  if($form_id == "views_form_courriel_de_groupe_page") {
    if ($form_state['step'] == 'views_send_config_form') {
      $form['to']['views_send_to_name']['#default_value'] = 'users_name_pos_0';
      $form['to']['views_send_to_mail']['#default_value'] = 'users_mail_pos_2';
      $form['to']['#access'] = FALSE;
      $form['mail']['views_send_message']['#format'] = 'full_html';
      $form['actions']['submit']['#value'] = 'Envoyer';
    }
  }
}
areynolds’s picture

Issue summary: View changes
Status: Active » Closed (works as designed)

You can also achieve this by using Mime Mail on your site; guessing that Views Send wants other modules to handle this functionality, so I'm closing this unless anyone has an objection.

pikot’s picture

#1 The solution of PascalAnimateur works like a charm!