Move Email utility class to fm-common

There will be a corresponding fm change to delete from fm-util and modify its usage
all three return types done


On Mon, Aug 18, 2014 at 2:42 PM, Tim Underwood <notifications@github.com>
wrote:

> In src/main/scala/fm/common/EmailSender.scala:
>
> > @@ -0,0 +1,54 @@
> > +package fm.common
> > +
> > +import fm.common.Implicits._
> > +import java.util.Properties
> > +import javax.mail.{Message, Session, Transport}
> > +import javax.mail.internet.{AddressException, InternetAddress, MimeMessage}
> > +import scala.concurrent._
> > +
> > +final case class EmailSender (user: String, pass: String, host: String) {
> > +  def send(to: String, from: String, bcc: Seq[String] = Nil, replyTo: String, subject: String, body: String) = Service.call("EmailSender") {
> > +    sendImpl(to, from, bcc, replyTo, subject, body)
> > +  }
> > +
> > +  def sendAsync(to: String, from: String, bcc: Seq[String] = Nil, replyTo: String, subject: String, body: String)(implicit executionContext: ExecutionContext, timer: ScheduledTaskRunner) = Service.callAsync("EmailSenderAsync") {
>
> return type...
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/frugalmechanic/fm-common/pull/1/files#r16384128>.
>