Apache commons电子邮件别名在scala中无法正常工作

Apache commons电子邮件别名在scala中无法正常工作,scala,email,apache-commons-email,Scala,Email,Apache Commons Email,我使用ApacheComons的HtmlEmail类发送带有嵌入图像的HTML格式电子邮件 ApacheCommonsEmailAPI(v1.4)用于我的Scala项目 我在收到的电子邮件中没有看到别名(我的报告)作为发件人名称 以下是我的功能 @throws(classOf[EmailException]) @throws(classOf[Exception]) def createHTMLEmailMessage(htmlContent: String): EmailMessage

我使用ApacheComons的HtmlEmail类发送带有嵌入图像的HTML格式电子邮件

ApacheCommonsEmailAPI(v1.4)用于我的Scala项目

我在收到的电子邮件中没有看到别名(我的报告)作为发件人名称

以下是我的功能

@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("TO_address@gmail.com")

    email.setFrom("MY_address@GMAIL.com", "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

  }

在Outlook中收到的电子邮件中查看来源时进行更新,来源:我的报告收件人:但显示来源:姓名(别名不反映)