Send email notification of a new comment to site staff when email
        notifications have been requested.
515980
def email(self, comment, content_object, request):
        
        if not self.email_notification:
            return
        recipient_list = [manager_tuple[1] for manager_tuple in settings.MANAGERS]
        t = loader.get_template('comments/comment_notification_email.txt')
        c = Context({ 'comment': comment,
                      'content_object': content_object })
        subject = '[%s] New comment posted on "%s"' % (get_current_site(request).name,
                                                          content_object)
        message = t.render(c)
        send_mail(subject, message, settings.DEFAULT_FROM_EMAIL, recipient_list, fail_silently=True)
1273333
def notify(contact_request)
      @contact_request = contact_request

      mail to: notification_recipients,
           from: notification_sender(contact_request),
           subject: notification_subject
    end
718565
public function sendCommentSpamRequestMail( $comment, $updatePath ) {

		$siteName		= $this->coreProperties->getSiteName();
		$fromEmail		= $this->mailProperties->getSenderEmail();
		$fromName		= $this->mailProperties->getSenderName();
		$contactEmail	= $this->mailProperties->getContactEmail();

		// Send Mail
		$this->getMailer()->compose( self::MAIL_COMMENT_SPAM_REQUEST, [ 'coreProperties' => $this->coreProperties, 'comment' => $comment, 'updatePath' => $updatePath ] )
			->setTo( $contactEmail )
			->setFrom( [ $fromEmail => "$fromName | $siteName" ] )
			->setSubject( "Spam Request | " . $this->coreProperties->getSiteName() )
			//->setTextBody( "heroor" )
			->send();
	}
817350
def notify(self, topic, **kwargs):
        '''
        
        '''
        kwargs['name'] = self._name
        self._engine._notify(topic, **kwargs)
305080
function attachCommentReply(comment) {
    return function reply(body, callback) {
        github.replyToReviewComment(this.repo.data.owner.login, this.repo.data.name, this.data.number, comment.id, body, callback);
    }.bind(this);
}
94408
public function SendReviewCommentNotification($oComment)
    {
        if ($this->AllowSendAuthorReviewCommentNotification()) {
            $sAuthorEmail = $this->GetSendReviewCommentNotificationEmail();
            if (TTools::IsValidEMail($sAuthorEmail)) {
                $oMail = TDataMailProfile::GetProfile('review-comment');
                $aData = array();
                $oArticle = &$this->GetFieldShopArticle();
                $aData['sArticleName'] = $oArticle->GetName();
                $aData['sReviewTitle'] = $this->fieldTitle;
                $aData['sReviewText'] = $this->fieldComment;
                $aData['sCommentText'] = $oComment->fieldComment;
                $oMail->AddDataArray($aData);
                $oMail->ChangeToAddress($this->fieldAuthorEmail, $this->fieldAuthorName);
                $oMail->SendUsingObjectView('emails', 'Customer');
            }
        }
    }
88461
def send_comment_email(email, package_owner, package_name, commenter):
    """"""
    link = '{CATALOG_URL}/package/{owner}/{pkg}/comments'.format(
        CATALOG_URL=CATALOG_URL, owner=package_owner, pkg=package_name)
    subject = "New comment on {package_owner}/{package_name}".format(
        package_owner=package_owner, package_name=package_name)
    html = render_template('comment_email.html', commenter=commenter, link=link)
    body = render_template('comment_email.txt', commenter=commenter, link=link)
    send_email(recipients=[email], sender=DEFAULT_SENDER, subject=subject,
               html=html, body=body)
32262
def unsubscribe(self, email, id):
        
        self.db.execute([
            'UPDATE comments SET',
            '    notification=0',
            'WHERE email=? AND (id=? OR parent=?);'], (email, id, id))
262100
def send_comment_posted(comment, request):
    
    recipient_list = [manager_tuple[1] for manager_tuple in settings.MANAGERS]
    site = get_current_site(request)
    content_object = comment.content_object
    content_title = force_text(content_object)

    if comment.is_removed:
        subject = u'[{0}] Spam comment on "{1}"'.format(site.name, content_title)
    elif not comment.is_public:
        subject = u'[{0}] Moderated comment on "{1}"'.format(site.name, content_title)
    else:
        subject = u'[{0}] New comment posted on "{1}"'.format(site.name, content_title)

    context = {
        'site': site,
        'comment': comment,
        'content_object': content_object
    }

    message = render_to_string("comments/comment_notification_email.txt", context, request=request)
    if appsettings.FLUENT_COMMENTS_MULTIPART_EMAILS:
        html_message = render_to_string("comments/comment_notification_email.html", context, request=request)
    else:
        html_message = None

    send_mail(subject, message, settings.DEFAULT_FROM_EMAIL,
              recipient_list, fail_silently=True, html_message=html_message)
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))
1012613
def deliver_welcome_mail
      if has_role?('author') || has_role?('editor') || has_role?('admin')
        Notifications.alchemy_user_created(self).deliver_later
      else
        Notifications.member_created(self).deliver_later
      end
    end
1344796
function newComment($post_id, array $comment)
    {
        $params = array(1, $this->username, $this->password, $post_id, $comment);

        return $this->sendRequest('wp.newComment', $params);
    }
653866
def announcement_approved_email(request, obj, req):
    

    if not settings.PRODUCTION:
        logger.debug("Not in production. Ignoring email for approved announcement.")
        return
    subject = "Announcement Approved: {}".format(obj.title)
    """ Email to teachers who approved. """
    teachers = req.teachers_approved.all()

    teacher_emails = []
    for u in teachers:
        em = u.tj_email
        if em:
            teacher_emails.append(em)

    base_url = request.build_absolute_uri(reverse('index'))
    url = request.build_absolute_uri(reverse('view_announcement', args=[obj.id]))

    if len(teacher_emails) > 0:
        data = {"announcement": obj, "request": req, "info_link": url, "base_url": base_url, "role": "approved"}
        email_send("announcements/emails/announcement_approved.txt", "announcements/emails/announcement_approved.html", data, subject, teacher_emails)
        messages.success(request, "Sent teacher approved email to {} users".format(len(teacher_emails)))
    """ Email to submitter. """
    submitter = req.user
    submitter_email = submitter.tj_email
    if submitter_email:
        submitter_emails = [submitter_email]
        data = {"announcement": obj, "request": req, "info_link": url, "base_url": base_url, "role": "submitted"}
        email_send("announcements/emails/announcement_approved.txt", "announcements/emails/announcement_approved.html", data, subject,
                   submitter_emails)
        messages.success(request, "Sent teacher approved email to {} users".format(len(submitter_emails)))
1312232
def emailComment(comment, obj, request):
    """"""
    if not obj.author.frog_prefs.get().json()['emailComments']:
        return

    if obj.author == request.user:
        return

    html = render_to_string('frog/comment_email.html', {
        'user': comment.user,
        'comment': comment.comment,
        'object': obj,
        'action_type': 'commented on',
        'image': isinstance(obj, Image),
        'SITE_URL': FROG_SITE_URL,
    })

    subject = '{}: Comment from {}'.format(getSiteConfig()['name'], comment.user_name)
    fromemail = comment.user_email
    to = obj.author.email
    text_content = 'This is an important message.'
    html_content = html

    send_mail(subject, text_content, fromemail, [to], html_message=html_content)
472622
def allow(self, comment, content_object, request):
        """"""
        
        POST = urlencode({
                "blog": settings.AKISMET_BLOG.encode("utf-8"),
                "user_ip": comment.ip_address,
                "user_agent": request.META.get('HTTP_USER_AGENT', "").
                                                encode("utf-8"),
                "referrer": request.META.get('HTTP_REFERRER', "").
                                                encode("utf-8"),
                "comment_author": comment.user_name.encode("utf-8"),
                "comment_author_email": comment.user_email.encode("utf-8"),
                "comment_author_url": comment.user_url.encode("utf-8"),
                "comment_content": comment.comment.encode("utf-8")})
        connection = HTTPConnection(AKISMET_URL, AKISMET_PORT)
        connection.request("POST", AKISMET_PATH, POST,
                           {"User-Agent": AKISMET_USERAGENT,
                            "Content-type":"application/x-www-form-urlencoded"
                            })
        response = connection.getresponse()
        status, result = response.status, response.read()
        if result == "false":
            return True
        elif result == "true" and settings.DISCARD_SPAM:
            return False
        elif result == "true":
            comment.is_removed = True
            comment.is_public = False
            return True
        else:
            raise AkismetError(status, result)
594404
def send_confirm_email_email(self, user, user_email):
        """"""
        
        # Verify config settings
        if not self.user_manager.USER_ENABLE_EMAIL: return
        if not self.user_manager.USER_ENABLE_CONFIRM_EMAIL: return

        # The confirm_email email is sent to a specific user_email.email or user.email
        email = user_email.email if user_email else user.email

        # Generate a confirm_email_link
        object_id = user_email.id if user_email else user.id
        token = self.user_manager.generate_token(object_id)
        confirm_email_link = url_for('user.confirm_email', 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_CONFIRM_EMAIL_TEMPLATE,
            confirm_email_link=confirm_email_link,
        )
31958
def send_ready_for_review(build_id, release_name, release_number):
    """"""
    build = models.Build.query.get(build_id)

    if not build.send_email:
        logging.debug(
            'Not sending ready for review email because build does not have '
            'email enabled. build_id=%r', build.id)
        return

    ops = operations.BuildOps(build_id)
    release, run_list, stats_dict, _ = ops.get_release(
        release_name, release_number)

    if not run_list:
        logging.debug(
            'Not sending ready for review email because there are '
            ' no runs. build_id=%r, release_name=%r, release_number=%d',
            build.id, release.name, release.number)
        return

    title = '%s: %s - Ready for review' % (build.name, release.name)

    email_body = render_template(
        'email_ready_for_review.html',
        build=build,
        release=release,
        run_list=run_list,
        stats_dict=stats_dict)

    recipients = []
    if build.email_alias:
        recipients.append(build.email_alias)
    else:
        for user in build.owners:
            recipients.append(user.email_address)

    if not recipients:
        logging.debug(
            'Not sending ready for review email because there are no '
            'recipients. build_id=%r, release_name=%r, release_number=%d',
            build.id, release.name, release.number)
        return

    message = Message(title, recipients=recipients)
    message.html = email_body

    logging.info('Sending ready for review email for build_id=%r, '
                 'release_name=%r, release_number=%d to %r',
                 build.id, release.name, release.number, recipients)

    return render_or_send(send_ready_for_review, message)