[ 
https://issues.apache.org/jira/browse/EMAIL-164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

prax net updated EMAIL-164:
---------------------------
    Description: 
I am using Commons Email API (v1.4) in my Scala project

in SCALA's build.sbt i have included following line
"org.apache.commons"          % "commons-email"           % "1.4",



Following is EMAIL Function


 @throws(classOf[EmailException])
  @throws(classOf[Exception])
  def createHTMLEmailMessage(htmlContent: String): EmailMessage = {

    val email = new HtmlEmail

    // alternative message if the client does not support html
   
    email.setHtmlMsg(htmlContent)

    email.addTo("[email protected]")

    email.setFrom("[email protected]", "MY REPORTS")

    email.setHostName("MY_HOSTNAME")

    email.setSmtpPort(587)

    email.setAuthentication("USERNAME","PASSWORD")

    email.setStartTLSEnabled(true)

    email.setSSLOnConnect(false)

    email.setSubject("Subject")

    val emailMsg = EmailMessage(email)

    emailMsg

  }

  was:
I am using Commons Email API (v1.4) in my Scala project

in SCALA's build.sbt i have included following line
"org.apache.commons"          % "commons-email"           % "1.4",



Following is EMAIL Function


 @throws(classOf[EmailException])
  @throws(classOf[Exception])
  def createHTMLEmailMessage(htmlContent: String): EmailMessage = {
    val email = new HtmlEmail
    // alternative message if the client does not support html
   
    email.setHtmlMsg(htmlContent)
    email.addTo("[email protected]")
    email.setFrom("[email protected]", "MY REPORTS")
    email.setHostName("MY_HOSTNAME")
    email.setSmtpPort(587)
    email.setAuthentication("USERNAME","PASSWORD")
    email.setStartTLSEnabled(true)
    email.setSSLOnConnect(false)
    email.setSubject("Subject")
    val emailMsg = EmailMessage(email, retryDuration)
    emailMsg
  }


> Setting Alias using setFrom of HtmlEmail is not working when calling from 
> Scala
> -------------------------------------------------------------------------------
>
>                 Key: EMAIL-164
>                 URL: https://issues.apache.org/jira/browse/EMAIL-164
>             Project: Commons Email
>          Issue Type: Bug
>    Affects Versions: 1.4
>            Reporter: prax net
>
> I am using Commons Email API (v1.4) in my Scala project
> in SCALA's build.sbt i have included following line
> "org.apache.commons"          % "commons-email"           % "1.4",
> Following is EMAIL Function
>  @throws(classOf[EmailException])
>   @throws(classOf[Exception])
>   def createHTMLEmailMessage(htmlContent: String): EmailMessage = {
>     val email = new HtmlEmail
>     // alternative message if the client does not support html
>    
>     email.setHtmlMsg(htmlContent)
>     email.addTo("[email protected]")
>     email.setFrom("[email protected]", "MY REPORTS")
>     email.setHostName("MY_HOSTNAME")
>     email.setSmtpPort(587)
>     email.setAuthentication("USERNAME","PASSWORD")
>     email.setStartTLSEnabled(true)
>     email.setSSLOnConnect(false)
>     email.setSubject("Subject")
>     val emailMsg = EmailMessage(email)
>     emailMsg
>   }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to