     ScraperWiki
     """
 
-  # send mail with defined transport object
-  transport.sendMail mailOptions, (err, res) ->
-    transport.close()
-    if err?
-      callback err
-    else
-      callback null
+  sendGridEmail mailOptions, callback
 
 exports.dataRequestEmail = (dataRequest, callback) ->
-  transport = nodemailer.createTransport 'SMTP',
-    service: "SendGrid"
-    auth:
-      user: process.env.CU_SENDGRID_USER
-      pass: process.env.CU_SENDGRID_PASS
-
   mailOptions =
     from: dataRequest.email
     to: process.env.CU_REQUEST_EMAIL


#TODO: html email (templates?)

exports.signUpEmail = (user, token, callback) ->
  transport = nodemailer.createTransport 'SMTP',
    service: "SendGrid"
    auth:
      user: process.env.CU_SENDGRID_USER
      pass: process.env.CU_SENDGRID_PASS

  mailOptions =
    from: 'hello@scraperwiki.com'
    to: user.email[0]


    """

  sendGridEmail mailOptions, callback

exports.dataRequestConfirmation = (dataRequest, callback) ->
  mailOptions =
    from: process.env.CU_REQUEST_EMAIL
    to: dataRequest.email
