Override the default emails already defined by other apps
429133
def override_default_templates(self):
        
        if plugs_mail_settings['OVERRIDE_TEMPLATE_DIR']:
            dir_ = plugs_mail_settings['OVERRIDE_TEMPLATE_DIR']
            for file_ in os.listdir(dir_):
                if file_.endswith(('.html', 'txt')):
                    self.overrides[file_] = dir_
1282244
function(template, options){
			var payload = { data: {}, template_id: template };

			// Add root attributes to the payload root
			for(var attr in rootAttributes){
				if(!rootAttributes.hasOwnProperty(attr)){
					continue;
				}
				if(typeof options[attr] === 'undefined'){
					continue;
				}
				var key = rootAttributes[attr],
					val = options[attr];
				payload[key] = val;
				delete options[attr];
			}

			// Add any left over attribtues to the data object
			for(attr in options){
				if(!options.hasOwnProperty(attr)){
					continue;
				}
				payload.data[attr] = options[attr]
			}

			// Add to the list of emails
			this.mails.push(payload);
		}
741242
def config(name='EMAIL_URL', default='console://'):
    """"""
    conf = {}
    s = env(name, default)
    if s:
        conf = parse_email_url(s)
    return conf
688860
def clean_email(self):
        
        if get_user_model().objects.filter(
            email__iexact=self.cleaned_data['email']):
            raise forms.ValidationError(_('This email is already in use. Please supply a different email.'))
        return self.cleaned_data['email']
617646
def _change_generic(env, model_name, record_ids, target_record_id,
                    exclude_columns, method='orm'):
    
    for model_to_replace, res_id_column, model_column in [
            ('calendar.event', 'res_id', 'res_model'),
            ('ir.attachment', 'res_id', 'res_model'),
            ('mail.activity', 'res_id', 'res_model'),
            ('mail.followers', 'res_id', 'res_model'),
            ('mail.message', 'res_id', 'model'),
            ('rating.rating', 'res_id', 'res_model'),
            ]:
        try:
            model = env[model_to_replace].with_context(active_test=False)
        except KeyError:
            continue
        if (model._table, res_id_column) in exclude_columns:
            continue
        if method == 'orm':
            records = model.search([
                (model_column, '=', model_name),
                (res_id_column, 'in', record_ids)])
            if records:
                records.write({res_id_column: target_record_id})
                logger.debug(
                    "Changed %s record(s) of model '%s'",
                    len(records), model_to_replace)
        else:
            logged_query(
                env.cr,
                """ UPDATE %(table)s
                    SET %(res_id_column)s = %(target_record_id)s
                    WHERE %(model_column)s = %(model_name)s
                    AND %(res_id_column)s in %(record_ids)s
                """,
                {
                    'table': AsIs(model._table),
                    'res_id_column': AsIs(res_id_column),
                    'model_column': AsIs(model_column),
                    'model_name': model_name,
                    'target_record_id': target_record_id,
                    'record_ids': record_ids,
                }, skip_no_result=True)
622292
def _existing(self, email):
        
        return self.store.findUnique(
            EmailAddress,
            EmailAddress.address == email,
            default=None)
190944
function overrideConfig(config) {
    if (fs.existsSync(config.config)) {
        var content = fs.readFileSync(config.config, {
            encoding: "utf8"
        });
        var configFile = JSON.parse(content);
        for (var key in configFile) {
            if (configFile.hasOwnProperty(key)) {
                config[key] = configFile[key];
            }
        }
    }
    return config;
}
329962
def change_email(self, email):
        

        def cb():
            if not utils.is_email_valid(email):
                raise exceptions.AuthError("Email address invalid")
            self.user.change_email(email)
            return email

        return signals.user_update(self, ACTIONS["EMAIL"], cb,
                                   {"email": self.email})
1011464
function override (server) {
  ['trace', 'log', 'info', 'warn', 'error'].forEach(method => {
    const target = method === 'log' ? 'debug' : method
    console[method] = wrapper.bind(undefined, server, target)
  })
}
504870
public function resetEmails(){
        foreach($this->options as $op=>$junk){
            if(preg_match("#NotificationEmailList#",$op)){
                unset($this->options[$op]);
            }
        }
    }
264471
def cancel_email_change(self):
        
        if not self.email_new:
            return

        self.email_new = None
        self.email_confirmed = True
        self.email_link = None
        self.email_new = None
        self.email_link_expires = None
763757
function setDefaults(definition) {
      providerConfig.optionsFactory = definition.options;
      providerConfig.methods = (definition.methods || []).concat(EXPOSED_METHODS);
      return provider;
    }
1194158
def suppress(self, email):
        """"""
        body = {
            "EmailAddresses": [email] if isinstance(email, str) else email}
        response = self._post(self.uri_for("suppress"), json.dumps(body))
210357
protected function setForgottenDefaults()
    {
        // ==== unchecked values ====
        $this->repairConfigValue('bcrypt_cost', 10);

        // cookies* values
        $this->repairConfigValue('cookie_name', 'phpauth_session_cookie');

        // verify* values
        $this->repairConfigValue('verify_password_min_length', 3);

        $this->repairConfigValue('verify_email_min_length', 5);

        $this->repairConfigValue('verify_email_max_length', 100);

        $this->repairConfigValue('verify_email_use_banlist', 1);

        // emailmessage* values

        $this->repairConfigValue('emailmessage_suppress_activation', 0);

        $this->repairConfigValue('emailmessage_suppress_reset', 0);

        $this->repairConfigValue('mail_charset', "UTF-8");

        // others
        $this->repairConfigValue('allow_concurrent_sessions', false);
	}
178888
def add_override(self, addr, key, value):
        """"""
        address = Address(str(addr)).id
        _LOGGER.debug('New override for %s %s is %s', address, key, value)
        device_override = self._overrides.get(address, {})
        device_override[key] = value
        self._overrides[address] = device_override
629216
def CorrectWrongEmails(self, askInput=True):
        ''''''
        for email in self.wrong_emails:
            corrected_email = self.CorrectEmail(email)
            self.emails[self.emails.index(email)] = corrected_email

        self.wrong_emails = []
809192
function(appName) {
      var appDefaults = {
        name : null,
        task: {
          name: null,
          description: null
        },
        options: []
      };
      apps[appName] = appDefaults;
      apps[appName].name = appName;
    }