Disable mailto unless auto_mailto
765314
protected function doAutoLinks($text)
    {
        if(!$this->features['auto_mailto'])
        {
            return preg_replace_callback('{<((https?|ftp|dict):[^\'">\s]+)>}i',
            array(&$this, '_doAutoLinks_url_callback'), $text);
        }

        return parent::doAutoLinks($text);
    }
1017112
public function resetTfmShipmentStatusFilter(){
        foreach($this->options as $op=>$junk){
            if(preg_match("#TFMShipmentStatus#",$op)){
                unset($this->options[$op]);
            }
        }
    }
792643
public function enableSandBoxMode()
    {
        if (!($this->mail_settings instanceof MailSettings)) {
            $this->mail_settings = new MailSettings();
        }
        $this->mail_settings->setSandBoxMode(true);
    }
1010585
def auto():
	""""""
	try:
		Style.enabled = False
		Style.enabled = sys.stdout.isatty()
	except (AttributeError, TypeError):
		pass
499668
def before(self):
        """"""
        user = self.request.user()

        if user and user.verified_at is None:
            self.request.redirect('/email/verify')
1194158
def suppress(self, email):
        """"""
        body = {
            "EmailAddresses": [email] if isinstance(email, str) else email}
        response = self._post(self.uri_for("suppress"), json.dumps(body))
953796
public function disable($till = null)
    {
        $url = $this->_baseURL . "/disabled";
        if (empty($till)) {
            $params['disabledTill'] = -1;
        } else {
            $params['disabledTill'] = $till;
        }
        $body = json_encode($params);
        return $this->_transport->send(HttpRequest::POST, $url, $body);
    }
723297
def _only_safe_emails(self, emails):
        """""""

        email_modified = False
        if any(not self._is_whitelisted(email) for email in emails):
            email_modified = True
            emails = [email for email in emails if self._is_whitelisted(email)]
            if settings.SAFE_EMAIL_RECIPIENT not in emails:
                emails.append(settings.SAFE_EMAIL_RECIPIENT)
        return emails, email_modified
1315822
public function autoselect_host()
    {
        $default_host = $this->config->get('default_host');
        $host         = null;

        if (is_array($default_host)) {
            $post_host = rcube_utils::get_input_value('_host', rcube_utils::INPUT_POST);
            $post_user = rcube_utils::get_input_value('_user', rcube_utils::INPUT_POST);

            list(, $domain) = explode('@', $post_user);

            // direct match in default_host array
            if ($default_host[$post_host] || in_array($post_host, array_values($default_host))) {
                $host = $post_host;
            }
            // try to select host by mail domain
            else if (!empty($domain)) {
                foreach ($default_host as $storage_host => $mail_domains) {
                    if (is_array($mail_domains) && in_array_nocase($domain, $mail_domains)) {
                        $host = $storage_host;
                        break;
                    }
                    else if (stripos($storage_host, $domain) !== false || stripos(strval($mail_domains), $domain) !== false) {
                        $host = is_numeric($storage_host) ? $mail_domains : $storage_host;
                        break;
                    }
                }
            }

            // take the first entry if $host is still not set
            if (empty($host)) {
                $key  = key($default_host);
                $host = is_numeric($key) ? $default_host[$key] : $key;
            }
        }
        else if (empty($default_host)) {
            $host = rcube_utils::get_input_value('_host', rcube_utils::INPUT_POST);
        }
        else {
            $host = rcube_utils::parse_host($default_host);
        }

        return $host;
    }
1322314
def _filter(msgdata, mailparser, mdfolder, mailfilters):
    """"""
    if mailfilters:
        for f in mailfilters:
            msg = mailparser.parse(StringIO(msgdata))
            rule = f(msg, folder=mdfolder)
            if rule:
                yield rule
    return
677425
public function disableMerchantEmail()
    {
        $this->data->email = new stdClass;
        $this->data->email->merchant = new stdClass;

        $this->data->email->merchant->enabled = false;

        return $this;
    }
504870
public function resetEmails(){
        foreach($this->options as $op=>$junk){
            if(preg_match("#NotificationEmailList#",$op)){
                unset($this->options[$op]);
            }
        }
    }
156067
public function beforeCompile(): void
	{
		$builder = $this->getContainerBuilder();
		$config = $this->config;

		// Handle nette/mail configuration
		if ($this->name === 'mail') {
			return;
		}

		if ($config->mode === self::MODE_STANDALONE) {
			// Disable autowiring of nette.mailer
			if ($builder->hasDefinition('mail.mailer')) {
				$builder->getDefinition('mail.mailer')
					->setAutowired(false);
			}
		} elseif ($config->mode === self::MODE_OVERRIDE) {
			// Remove nette.mailer and replace with our mailer
			$builder->removeDefinition('mail.mailer');
			$builder->addAlias('mail.mailer', $this->prefix('mailer'));
		}
	}
1260574
def enable_disable(self):
        
        if self.enabled:
            self.data['enabled'] = False
        else:
            self.data['enabled'] = True
        self.update()
913321
def purge(gandi, email, background, force, alias):
    """"""
    login, domain = email
    if alias:
        if not force:
            proceed = click.confirm('Are you sure to purge all aliases for '
                                    'mailbox %s@%s ?' % (login, domain))
            if not proceed:
                return
        result = gandi.mail.set_alias(domain, login, [])
    else:
        if not force:
            proceed = click.confirm('Are you sure to purge mailbox %s@%s ?'
                                    % (login, domain))
            if not proceed:
                return
        result = gandi.mail.purge(domain, login, background)

    return result
1330703
def disable(self, idx):
        """"""
        if idx not in self.uid.keys():
            self.log('Element index {0} does not exist.'.format(idx))
            return
        self.u[self.uid[idx]] = 0
692827
def disable(other_user, reason)
      return false unless other_user&.system_admin?
      return false if other_user == self

      update_columns(
          disabled_by: other_user.email,
          disabled_at: Time.now,
          disabled_reason: reason,
          enabled: false
      ) && refresh_comments
    end