Set contact email for NCBI.
508246
def set_ncbi_email():
    """"""
    Entrez.email = args.email
    logger.info("Set NCBI contact email to %s", args.email)
    Entrez.tool = "genbank_get_genomes_by_taxon.py"
1323106
protected void setEmailBox() {

        m_sendEmail.setEnabled(
            !CmsStringUtil.isEmptyOrWhitespaceOnly(m_pw.getPassword1())
                | !CmsStringUtil.isEmptyOrWhitespaceOnly(m_pw.getPassword2()));
    }
280645
function sendAlertEmail(alertEmailData, cb) {
  var mongoAlert = alertEmailData.alert;
  var eventDetails = alertEmailData.eventDetails;
  var emailConfig = config.getConfig().email;
  var from = emailConfig ? emailConfig.alert_email_from : 'noreply@feedhenry.com';

  fs.readFile(ALERT_EMAIL_TEMPLATE, function(err, data) {
    if (err) {
      return cb({
        'error': 'Could not load email template from "' + ALERT_EMAIL_TEMPLATE + '": ' + err
      });
    }
    var emailBody = data.toString();
    emailBody = emailBody.replace(/%appName%/g, eventDetails.appName || "");
    emailBody = emailBody.replace(/%appGuid%/g, eventDetails.uid);
    emailBody = emailBody.replace(/%appUrl%/g, ' ');
    emailBody = emailBody.replace(/%alertName%/g, mongoAlert.alertName);
    emailBody = emailBody.replace(/%eventTimestamp%/g, eventDetails.timestamp);
    emailBody = emailBody.replace(/%updatedBy%/g, eventDetails.updatedBy);
    emailBody = emailBody.replace(/%eventMessage%/g, eventDetails.details.message);
    emailBody = emailBody.replace(/%eventCategory%/g, eventDetails.eventClass);
    emailBody = emailBody.replace(/%eventName%/g, eventDetails.eventType);
    emailBody = emailBody.replace(/%eventSeverity%/g, eventDetails.eventLevel);
    emailBody = emailBody.replace(/%eventDetails%/g, JSON.stringify(eventDetails.details));
    emailBody = emailBody.replace(/%providerName%/g, from);

    getTransport(emailConfig).sendMail({
      from: from,
      to: mongoAlert.emails,
      subject: 'Alert Name: ' + mongoAlert.alertName + ' - Cloud App (' + mongoAlert.uid + ')',
      html: emailBody
    }, cb);
  });
}
522076
def get_contact(self, email):
        

        contacts = self.get_contacts()
        for contact in contacts:
            if contact['email'] == email:
                return contact

        msg = 'No contact with email: "{email}" found.'
        raise FMBaseError(msg.format(email=email))
339502
public void setEmail(String email) {
        SystemAssert.requireArgument(email != null && !email.isEmpty(), "Email cannot be null or empty.");
        this.email = email;
    }
36658
def notify(cls, user_or_email, instance):
        """"""
        return super(InstanceEvent, cls).notify(user_or_email,
                                                object_id=instance.pk)
1246591
def update(self, request, key):
        """"""

        request.UPDATE = http.QueryDict(request.body)

        email_addr = request.UPDATE.get('email')
        user_id = request.UPDATE.get('user')
        if not email_addr:
            return http.HttpResponseBadRequest()

        try:
            email = EmailAddress.objects.get(address=email_addr,
                                             user_id=user_id)
        except EmailAddress.DoesNotExist:
            raise http.Http404

        email.user.email = email_addr
        email.user.save()
        return http.HttpResponse(status=204)
829456
def send_template_email(recipients, title_template, body_template, context, language):
    """"""

    send_emails = getattr(settings, 'SEND_PLANS_EMAILS', True)
    if not send_emails:
        return

    site_name = getattr(settings, 'SITE_NAME', 'Please define settings.SITE_NAME')
    domain = getattr(settings, 'SITE_URL', None)

    if domain is None:
        try:
            Site = apps.get_model('sites', 'Site')
            current_site = Site.objects.get_current()
            site_name = current_site.name
            domain = current_site.domain
        except LookupError:
            pass

    context.update({'site_name': site_name, 'site_domain': domain})

    if language is not None:
        translation.activate(language)

    mail_title_template = loader.get_template(title_template)
    mail_body_template = loader.get_template(body_template)
    title = mail_title_template.render(context)
    body = mail_body_template.render(context)

    try:
        email_from = getattr(settings, 'DEFAULT_FROM_EMAIL')
    except AttributeError:
        raise ImproperlyConfigured('DEFAULT_FROM_EMAIL setting needed for sending e-mails')

    mail.send_mail(title, body, email_from, recipients)

    if language is not None:
        translation.deactivate()

    email_logger.info(u"Email (%s) sent to %s\nTitle: %s\n%s\n\n" % (language, recipients, title, body))
249209
def by_email_address(cls, email):
        """"""
        return DBSession.query(cls).filter_by(email_address=email).first()
974370
def send(self, confirmation_email, send_date="immediately"):
        """"""
        body = {
            "ConfirmationEmail": confirmation_email,
            "SendDate": send_date}
        response = self._post(self.uri_for("send"), json.dumps(body))
588086
def set_my_info(self, message, contact_info=""):
        """"""
        contacts = self.load("contact_info", {})
        contacts[message.sender.handle] = {
            "info": contact_info,
            "name": message.sender.name,
        }
        self.save("contact_info", contacts)
        self.say("Got it.", message=message)
903216
def reassign(self, from_email, user_ids):
        """"""
        endpoint = '/'.join((self.endpoint, self.id,))

        if from_email is None or not isinstance(from_email, six.string_types):
            raise MissingFromEmail(from_email)

        if user_ids is None or not isinstance(user_ids, list):
            raise InvalidArguments(user_ids)
        if not all([isinstance(i, six.string_types) for i in user_ids]):
            raise InvalidArguments(user_ids)

        assignees = [
            {
                'assignee': {
                    'id': user_id,
                    'type': 'user_reference',
                }
            }
            for user_id in user_ids
        ]

        add_headers = {'from': from_email, }
        data = {
            'incident': {
                'type': 'incident',
                'assignments': assignees,
            }
        }

        result = self.request('PUT',
                              endpoint=endpoint,
                              add_headers=add_headers,
                              data=data,)
        return result
674669
public void setEmail(String email) {

        checkEmail(email);
        if (email != null) {
            email = email.trim();
        }
        m_email = email;
    }
714873
public function setEmail(string $email) : CNabuDataObject
    {
        $value = parent::setEmail(strtolower($email));

        return $value;
    }
550203
def update(self, new_email_address, name, access_level, password=None):
        """"""
        params = {"email": self.email_address}
        body = {
            "EmailAddress": new_email_address,
            "Name": name,
            "AccessLevel": access_level,
            "Password": password}
        response = self._put("/clients/%s/people.json" % self.client_id,
                             body=json.dumps(body), params=params)
        # Update self.email_address, so this object can continue to be used
        # reliably
        self.email_address = new_email_address
478562
def __validate_email(self, email):
        """"""

        e = re.match(self.EMAIL_ADDRESS_REGEX, email, re.UNICODE)
        if e:
            return email
        else:
            error = "Invalid email address: " + str(email)
            msg = self.GRIMOIRELAB_INVALID_FORMAT % {'error': error}
            raise InvalidFormatError(cause=msg)
323079
public function setEmail(string $email = null) : CNabuDataObject
    {
        parent::setEmail($email);
        return parent::setEmailHash(is_string($email) ? self::encodeEmail($email) : null);
    }