Move Email utility class to fm-common

There will be a corresponding fm change to delete from fm-util and modify its usage
done


On Mon, Aug 18, 2014 at 2:45 PM, Tim Underwood <notifications@github.com>
wrote:

> In src/main/scala/fm/common/EmailSender.scala:
>
> > +  def sendAsync(to: String, from: String, bcc: Seq[String] = Nil, replyTo: String, subject: String, body: String)(implicit executionContext: ExecutionContext, timer: ScheduledTaskRunner) = Service.callAsync("EmailSenderAsync") {
> > +    Future { sendImpl(to, from, bcc, replyTo, subject, body) }
> > +  }
> > +
> > +  private def sendImpl(to: String, from: String, bcc: Seq[String], replyTo: String, subject: String, body: String) {
> > +    val props = new Properties
> > +
> > +    props.put("mail.smtp.starttls.enable", "true")
> > +    props.put("mail.smtp.host", host)
> > +    props.put("mail.smtp.user", user)
> > +    props.put("mail.smtp.password", pass)
> > +    props.put("mail.smtp.port", "587")
> > +    props.put("mail.smtp.auth", "true")
> > +
> > +    val session: Session     = Session.getDefaultInstance(props, null)
> > +    val message: MimeMessage = new MimeMessage(session)
>
> I'm not sure if they need to line up
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/frugalmechanic/fm-common/pull/1/files#r16384290>.
>