       if emails.length > 0
         log "There are #{emails.length} mail in queue."
         for email in emails
-          prepareAndSendEmail email
+          prepareEmail email, sendEmail
       # else
       #   log "E-Mail queue is empty. Yay."
 
-job.start()+instantEmailsCron = new CronJob email.notificationCronInstant, instantEmails
+instantEmailsCron.start()
    template        : template.instantMail
    definition      : "private messages"

prepareAndSendEmail = (notification)->

  sendEmail = (details)->
    {notification} = details
    # log "MAIL", flags[details.key].template details

    Emailer.send
      To        : 'gokmen+testing@koding.com' # details.email
      Subject   : template.commonHeader details
      HtmlBody  : flags[details.key].template details
    , (err, status)->
      log "An error occured: #{err}" if err
      notification.update $set: status: 'attempted', (err)->
        console.error err if err

  fetchSubjectContent = (contents, callback)->
    {constructorName} = contents.subject
    constructor       = Base.constructors[constructorName]
    constructor.one {_id:contents.subject.id}, (err, res)->
      if err then console.error err
      callback err, res

  fetchContent = (content, callback)->
    {constructorName} = content
    unless constructorName
      callback new KodingError 'Action type wrong.'
    else
      constructor     = Base.constructors[constructorName]
      {id}            = content
      constructor.one {_id:id}, (err, res)->
        if err then console.error err
        callback err, res

  fetchSubjectContentLink = (content, type, callback)->

    contentTypeLinkMap = (link)->
      pre = "<a href='#{uri.address}/Activity/#{link}' #{template.linkStyle}>"

      JReview           : "#{pre}review</a>"
      JComment          : "#{pre}comment</a>"
      JOpinion          : "#{pre}opinion</a>"
      JCodeSnip         : "#{pre}code snippet</a>"
      JTutorial         : "#{pre}tutorial</a>"
      JDiscussion       : "#{pre}discussion</a>"
      JLinkActivity     : "#{pre}link</a>"
      JStatusUpdate     : "#{pre}status update</a>"
      JPrivateMessage   : "#{pre}private message</a>"
      JQuestionActivity : "#{pre}question</a>"

    if type is 'JPrivateMessage'
      callback null, "<a href='https://koding.com/Inbox' #{template.linkStyle}>private message</a>"
    else if content.slug
      callback null, contentTypeLinkMap(content.slug)[type]
    else
      {constructorName} = content.bongo_
      constructor = Base.constructors[constructorName]
      constructor.fetchRelated? content._id, (err, relatedContent)->
        if err then callback err
        else
          if relatedContent.slug? or constructorName in ['JReview']
            callback null, contentTypeLinkMap(relatedContent.slug)[type]
          else
            constructor = \
              Base.constructors[relatedContent.bongo_.constructorName]
            constructor.fetchRelated? relatedContent._id, (err, content)->
              if err then callback err
              else
                callback null, contentTypeLinkMap(content.slug)[type]

  {JAccount, JEmailNotificationGG} = worker.models


              else
                details = {sender, receiver, event, email, key, notification}
                if event is 'FollowHappened'
                  cb details
                else
                  # Fetch Subject Content
                  fetchSubjectContent notification.activity, \
