Resolve an alert using a valid email address.
174000
def resolve(self, from_email):
        """"""
        if from_email is None or not isinstance(from_email, six.string_types):
            raise MissingFromEmail(from_email)

        parent_incident_id = self['incident']['id']
        endpoint_format = 'incidents/{0}/alerts/{1}'
        endpoint = endpoint_format.format(parent_incident_id, self['id'])

        add_headers = {'from': from_email, }
        data = {
            'alert': {
                'id': self['id'],
                'type': 'alert',
                'status': 'resolved',
            }
        }

        result = self.request('PUT',
                              endpoint=endpoint,
                              add_headers=add_headers,
                              data=data,)
        return result
241685
function() {
    var errorMessage =
        firebaseui.auth.widget.handler.common.getErrorMessage(emailExistsError);
    firebaseui.auth.ui.element.setValid(component.getEmailElement(), false);
    firebaseui.auth.ui.element.show(
        component.getEmailErrorElement(), errorMessage);
    component.getEmailElement().focus();
  }
621742
def validate_email_with_name(value):
    
    value = force_text(value)

    recipient = value
    if '<' and '>' in value:
        start = value.find('<') + 1
        end = value.find('>')
        if start < end:
            recipient = value[start:end]

    validate_email(recipient)
1334347
def verify_email_for_object(self, email, content_object, email_field_name='email'):
        

        confirmation_key = generate_random_token()

        try:
            confirmation = EmailConfirmation()
            confirmation.content_object = content_object
            confirmation.email_field_name = email_field_name
            confirmation.email = email
            confirmation.confirmation_key = confirmation_key
            confirmation.save()
        except IntegrityError:
            confirmation = EmailConfirmation.objects.get_for_object(content_object, email_field_name)
            confirmation.email = email
            confirmation.confirmation_key = confirmation_key
            confirmation.save(update_fields=['email', 'confirmation_key'])

        confirmation.send()

        return confirmation
249209
def by_email_address(cls, email):
        """"""
        return DBSession.query(cls).filter_by(email_address=email).first()
725392
def check_alerts(self):
        """"""

        alerted = []

        for alert_time, task in self.alerts.items():
            task_time = dateutil.parser.parse(alert_time)
            if task_time < get_time():
                self.log('Alerting about task now:', task)

                address = objectmodels['user'].find_one({'uuid': task.owner}).mail
                subject = "Task alert: %s" % task.name
                text = """Task alert is due:\n%s""" % task.notes

                self.fireEvent(send_mail(address, subject, text))

                alerted.append(task.alert_time)

        for item in alerted:
            del self.alerts[item]
889127
def confirm_email(token):
    """"""

    expired, invalid, user = confirm_email_token_status(token)

    if not user or invalid:
        invalid = True
        do_flash(*get_message('INVALID_CONFIRMATION_TOKEN'))

    already_confirmed = user is not None and user.confirmed_at is not None

    if expired and not already_confirmed:
        send_confirmation_instructions(user)
        do_flash(*get_message('CONFIRMATION_EXPIRED', email=user.email,
                              within=_security.confirm_email_within))
    if invalid or (expired and not already_confirmed):
        return redirect(get_url(_security.confirm_error_view) or
                        url_for('send_confirmation'))

    if user != current_user:
        logout_user()

    if confirm_user(user):
        after_this_request(_commit)
        msg = 'EMAIL_CONFIRMED'
    else:
        msg = 'ALREADY_CONFIRMED'

    do_flash(*get_message(msg))

    return redirect(get_url(_security.post_confirm_view) or
                    get_url(_security.login_url))
1335395
def CheckEmail(self, email, checkTypo=False):
        ''''''
        contents = email.split('@')
        if len(contents) == 2:
            if contents[1] in self.valid:
                return True
        return False
1189782
def email(self, value):
        """"""
        email = self.wait.until(expected.visibility_of_element_located(
            self._email_input_locator))
        email.clear()
        email.send_keys(value)
1320519
public void acceptAlert() {
        String action = "Clicking 'OK' on an alert";
        String expected = "Alert is present to be clicked";
        // wait for element to be present
        if (!is.alertPresent()) {
            waitFor.alertPresent();
        }
        if (!is.alertPresent()) {
            reporter.fail(action, expected, "Unable to click alert as it is not present");
            return; // indicates element not present
        }
        accept(action, expected, "alert");
    }
437083
def validate_email(self, email_address):

        '''
            
        '''

        title = '%s.validate_email' % __class__.__name__

    # validate inputs
        object_title = '%s(email_address="")' % title
        email_address = self.fields.validate(email_address, '.email_address', object_title)

    # construct request_kwargs
        request_kwargs = {
            'url': '%s/address/validate' % self.api_endpoint,
            'params': { 'address': email_address }
        }

    # send request
        response_details = self._get_request(**request_kwargs)

        return response_details
203136
def validate(self, email, **kwargs):
        """"""
        email = stringify(email)
        if email is None:
            return
        if not self.EMAIL_REGEX.match(email):
            return False
        mailbox, domain = email.rsplit('@', 1)
        return self.domains.validate(domain, **kwargs)
280202
def execute(self, email):
        """"""
        print('Sign up user {0}'.format(email))
        self.email_sender.send(email, 'Welcome, "{}"'.format(email))
735495
def associate(self, from_email, new_parent_incident=None):
        """"""
        if from_email is None or not isinstance(from_email, six.string_types):
            raise MissingFromEmail(from_email)

        if new_parent_incident is None:
            raise InvalidArguments(new_parent_incident)

        parent_incident_id = self['incident']['id']
        endpoint_format = 'incidents/{0}/alerts/{1}'
        endpoint = endpoint_format.format(parent_incident_id, self['id'])

        if isinstance(new_parent_incident, Entity):
            new_parent_incident_id = new_parent_incident['id']
        else:
            new_parent_incident_id = new_parent_incident

        add_headers = {'from': from_email, }
        data = {
            'alert': {
                'id': self['id'],
                'type': 'alert',
                'incident': {
                    'type': 'incident',
                    'id': new_parent_incident_id,
                }
            }
        }

        result = self.request('PUT',
                              endpoint=endpoint,
                              add_headers=add_headers,
                              data=data,)
        return result
1244079
def clean_email(self):
        
        if self.cleaned_data['email'].lower() == self.user.email:
            raise forms.ValidationError(_(u"You're already known under "
                                                "this email address."))
        if get_user_model().objects.filter(
                email__iexact=self.cleaned_data['email']).exclude(
                    email__iexact=self.user.email):
            raise forms.ValidationError(_(u'This email address is already '
                        'in use. Please supply a different email address.'))
        return self.cleaned_data['email']
150094
static public boolean isValidEmail(String email) {
    return email != null && email.trim().length() > 0 && email.indexOf("@") > 0;
  }
855421
def create_alert(self, alert):

        

        req = self.url + "/api/alert"
        data = alert.jsonify()
        try:
            return requests.post(req, headers={'Content-Type': 'application/json'}, data=data, proxies=self.proxies, auth=self.auth, verify=self.cert)
        except requests.exceptions.RequestException as e:
            raise AlertException("Alert create error: {}".format(e))