<commit_before>Maildog.Views.ComposeEmailBox = Backbone.CompositeView.extend(
  _.extend({}, Maildog.Mixins.NewEmail, {

    template: JST['composeEmailBox'],
    tagName: 'form',
    className: 'compose-email-popup',

    events: {
      "click .cancel-compose-box-popup": "removeView"
    },

    initialize: function(options) {
      this.$el.on("submit", function(e) {
        this.sendEmail(e, {
          saveEmail: false,
          success: function(){
            Backbone.history.navigate("#", { trigger: true })
          }.bind(this)
        })
      }.bind(this));
      this.model = ((options && options.email) || new Maildog.Models.Email());
      this.$el.on("input", $.proxy(this.saveEmail, this));
    },

    render: function() {
      this.$el.html(this.template({ email: this.model }));
      return this;
    }
  })
);
<commit_msg>fix bug when sending email<commit_after>Maildog.Views.ComposeEmailBox = Backbone.CompositeView.extend(
  _.extend({}, Maildog.Mixins.NewEmail, {

    template: JST['composeEmailBox'],
    tagName: 'form',
    className: 'compose-email-popup',

    initialize: function(options) {
      this.model = ((options && options.email) || new Maildog.Models.Email());
    },

    events: {
      "click .cancel-compose-box-popup": "removeView",
      "submit": "submit",
      "input": "saveEmail"
    },

    submit: function(e) {
      e.preventDefault();
      this.sendEmail({
        saveEmail: false
      })
    },

    render: function() {
      this.$el.html(this.template({ email: this.model }));
      return this;
    }
  })
);

{'fraction_non_alphanumeric': 0.17056222362602652, 'fraction_numerical': 0.0, 'mean_word_length': 2.63302752293578, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4433141', 'n_tokens_mistral': 506, 'n_tokens_neox': 497, 'n_words': 85}