Custom send email method to supplied the activation link and 
        new generated password.
189692
def send_activation_email(self, user, profile, password, site):
        
        ctx_dict = { 'password': password, 
                     'site': site, 
                     'activation_key': profile.activation_key,
                     'expiration_days': settings.ACCOUNT_ACTIVATION_DAYS}
                     
        subject = render_to_string(
            'registration/email/emails/password_subject.txt',
            ctx_dict)
        # Email subject *must not* contain newlines
        subject = ''.join(subject.splitlines())
        
        message = render_to_string('registration/email/emails/password.txt',
                                   ctx_dict)
                                   
        try:
            user.email_user(subject, message, settings.DEFAULT_FROM_EMAIL)
        except:
            pass
1372664
public Task<Void> sendResetPasswordEmail(@NonNull final String email) {
    return dispatcher.dispatchTask(
        new Callable<Void>() {
          @Override
          public Void call() {
            sendResetPasswordEmailInternal(email);
            return null;
          }
        });
  }
243400
def send_invite_email(application, link, is_secret):
    

    if not application.applicant.email:
        return

    context = CONTEXT.copy()
    context['receiver'] = application.applicant
    context['application'] = application
    context['link'] = link
    context['is_secret'] = is_secret

    to_email = application.applicant.email
    subject, body = render_email('common_invite', context)

    send_mail(subject, body, settings.ACCOUNTS_EMAIL, [to_email])
946003
def send_email(self, message):
        """"""
        msg = MIMEMultipart()
        msg['From'] = self.from_address
        msg['To'] = self.to_address
        msg['Subject'] = self.title
        msg.attach(MIMEText('<pre>' + cgi.escape(message) + '</pre>', 'html'))
        smtp = smtplib.SMTP(self.server, self.port,
                            timeout=self.timeout)
        if self.tls_auth:
            smtp.starttls()
            smtp.login(self.user, self.password)
        smtp.sendmail(self.from_address, self.to_address, msg.as_string())
        smtp.quit()
104137
def sendmail_proxy(subject, email, template, **context):
    """"""
    sendmail.delay(subject.value, email, template, **context)
344602
function (user, req, cb) {
  CoreController.getPluginViewDefaultTemplate({
    viewname: 'email/user/forgot_password_link',
    themefileext: appSettings.templatefileextension,
  },
		function (err, templatepath) {
  if (err) {
    cb(err);
  }			else {
				// console.log('emailForgotPasswordLink templatepath', templatepath);
    if (templatepath === 'email/user/forgot_password_link') {
      templatepath = path.resolve(process.cwd(), 'node_modules/periodicjs.ext.login/views', templatepath + '.' + appSettings.templatefileextension);
    }
				// console.log('user for forgot password', user);
    var coreMailerOptions = {
      appenvironment: appenvironment,
      to: user.email,
      from: appSettings.fromemail || appSettings.adminnotificationemail,
      replyTo: appSettings.fromemail || appSettings.adminnotificationemail,
      subject: loginExtSettings.settings.forgotPasswordEmailSubject || appSettings.name + ' - Reset your password',
      emailtemplatefilepath: templatepath,
      emailtemplatedata: {
        user: user,
        appname: appSettings.name,
        hostname: req.headers.host,
        filename: templatepath,
        adminPostRoute: req.adminPostRoute,
      },
    };
    if (loginExtSettings.settings.adminbccemail || appSettings.adminbccemail) {
      coreMailerOptions.bcc = loginExtSettings.settings.adminbccemail || appSettings.adminbccemail;
    }
    CoreMailer.sendEmail(coreMailerOptions, cb);
  }
}
	);
	// cb(null, options);
}
145396
def send_invite_user_email(self, user, user_invitation):
        """"""

        # Verify config settings
        if not self.user_manager.USER_ENABLE_EMAIL: return
        if not self.user_manager.USER_ENABLE_INVITE_USER: return

        # The user param points to the inviter
        # The user_invitation param points to the invitee
        invited_by_user = user

        # Use the invitation email
        email = user_invitation.email

        # Create a dummy user object to an empty name for the invitee
        user = self.user_manager.db_manager.UserClass(email=email)

        # Generate a accept_invitation_link
        token = self.user_manager.generate_token(user_invitation.id)
        accept_invitation_link = url_for('user.register', token=token, _external=True)

        # Render email from templates and send it via the configured EmailAdapter
        self._render_and_send_email(
            email,
            user,
            self.user_manager.USER_INVITE_USER_EMAIL_TEMPLATE,
            accept_invitation_link=accept_invitation_link,
            invited_by_user=invited_by_user,
        )
518194
def send_confirm_password_email(person):
    """"""
    url = '%s/profile/login/%s/' % (
        settings.REGISTRATION_BASE_URL, person.username)

    context = CONTEXT.copy()
    context.update({
        'url': url,
        'receiver': person,
    })

    to_email = person.email
    subject, body = render_email('confirm_password', context)

    send_mail(subject, body, settings.ACCOUNTS_EMAIL, [to_email])
229233
def account_activation(data = {})
      @data = {
          user: nil,
          client_ip: '0.0.0.0'
      }.merge(data || {})
      raise unless data[:user]
      mail to: data[:user].email, subject: 'Account activation'
    end
691548
def gen_reset_password_token(self, user=None, send_email=None):
        
        if not user and "form" in current_context.data and request.method == "POST":
            form = current_context.data.form
            user = self.find_by_email(form[self.options["email_column"]].data)
            if user is None:
                if self.options["reset_password_token_error_message"]:
                    flash(self.options["reset_password_token_error_message"], "error")
                current_context.exit(trigger_action_group="reset_password_failed")
                
        if not user:
            raise InvalidOptionError("Invalid user in 'reset_password_token' action")

        token = self._gen_reset_password_token(user)
        self.reset_password_token_signal.send(self, user=user, token=token)
        if (send_email is None and self.options["send_reset_password_email"]) or send_email:
            to_email = getattr(user, self.options["email_column"])
            current_app.features.emails.send(to_email, "users/reset_password.txt", user=user, token=token)
        return token
1157244
def send_password_reset_link(self, username):
        

        response = self._post(self.rest_url + "/user/mail/password",
                              params={"username": username})

        if response.ok:
            return True

        return False
215213
public function actionGenerate()
	{
		$passwordList = \App::$domain->tool->password->generate();
		$text = implode(SPC, $passwordList);
		Output::line();
		Output::pipe('Generated passwords');
		Output::autoWrap($text);
		Output::pipe();
		Output::line();
	}
123180
def send_approved_email(
        application, created_person, created_account, link, is_secret):
    """"""
    if not application.applicant.email:
        return

    context = CONTEXT.copy()
    context['receiver'] = application.applicant
    context['application'] = application
    context['created_person'] = created_person
    context['created_account'] = created_account
    context['link'] = link
    context['is_secret'] = is_secret
    subject, body = render_email('common_approved', context)
    to_email = application.applicant.email

    send_mail(subject, body, settings.ACCOUNTS_EMAIL, [to_email])
168201
def _invite(self, name, method, email, uuid, event, password=""):
        """"""

        props = {
            'uuid': std_uuid(),
            'status': 'Open',
            'name': name,
            'method': method,
            'email': email,
            'password': password,
            'timestamp': std_now()
        }
        enrollment = objectmodels['enrollment'](props)
        enrollment.save()

        self.log('Enrollment stored', lvl=debug)

        self._send_invitation(enrollment, event)

        packet = {
            'component': 'hfos.enrol.enrolmanager',
            'action': 'invite',
            'data': [True, email]
        }
        self.fireEvent(send(uuid, packet))
760181
def create_user(email, password, active, confirmed_at, send_email):
    
    if confirmed_at == 'now':
        confirmed_at = security.datetime_factory()
    user = user_manager.create(email=email, password=password, active=active,
                               confirmed_at=confirmed_at)
    if click.confirm(f'Are you sure you want to create {user!r}?'):
        security_service.register_user(user, allow_login=False, send_email=send_email)
        user_manager.save(user, commit=True)
        click.echo(f'Successfully created {user!r}')
    else:
        click.echo('Cancelled.')
202820
public function sendResetLinkEmail()
    {
        validator(request()->all(), [
            'email' => 'required|email',
        ])->validate();

        if ($author = WinkAuthor::whereEmail(request('email'))->first()) {
            cache(['password.reset.'.$author->id => $token = Str::random()],
                now()->addMinutes(30)
            );

            Mail::to($author->email)->send(new ResetPasswordEmail(
                encrypt($author->id.'|'.$token)
            ));
        }

        return redirect()->route('wink.password.forgot')->with('sent', true);
    }
1008290
def send(kwargs, opts):
    '''
    
    '''
    opt_keys = (
        'smtp.to',
        'smtp.from',
        'smtp.host',
        'smtp.port',
        'smtp.tls',
        'smtp.username',
        'smtp.password',
        'smtp.subject',
        'smtp.gpgowner',
        'smtp.content',
    )

    config = {}
    for key in opt_keys:
        config[key] = opts.get(key, '')

    config.update(kwargs)

    if not config['smtp.port']:
        config['smtp.port'] = 25

    log.debug('SMTP port has been set to %s', config['smtp.port'])
    log.debug("smtp_return: Subject is '%s'", config['smtp.subject'])

    if HAS_GNUPG and config['smtp.gpgowner']:
        gpg = gnupg.GPG(
            gnupghome=os.path.expanduser(
                '~{0}/.gnupg'.format(config['smtp.gpgowner'])
            ),
            options=['--trust-model always']
        )
        encrypted_data = gpg.encrypt(config['smtp.content'], config['smtp.to'])
        if encrypted_data.ok:
            log.debug('smtp_return: Encryption successful')
            config['smtp.content'] = six.text_type(encrypted_data)
        else:
            log.error(
                'SMTP: Encryption failed, only an error message will be sent'
            )
            config['smtp.content'] = (
                'Encryption failed, the return data was not sent.'
                '\r\n\r\n{0}\r\n{1}'
            ).format(encrypted_data.status, encrypted_data.stderr)

    message = (
        'From: {0}\r\n'
        'To: {1}\r\n'
        'Date: {2}\r\n'
        'Subject: {3}\r\n'
        '\r\n'
        '{4}'
    ).format(
        config['smtp.from'],
        config['smtp.to'],
        formatdate(localtime=True),
        config['smtp.subject'],
        config['smtp.content'],
    )

    log.debug('smtp_return: Connecting to the server...')
    server = smtplib.SMTP(config['smtp.host'], int(config['smtp.port']))

    if config['smtp.tls'] is True:
        server.starttls()
        log.debug('smtp_return: TLS enabled')

    if config['smtp.username'] and config['smtp.password']:
        server.login(config['smtp.username'], config['smtp.password'])
        log.debug('smtp_return: Authenticated')

    server.sendmail(config['smtp.from'], config['smtp.to'], message)
    log.debug('smtp_return: Message sent.')
    server.quit()