Search code examples
apache-axistomcat6html-email

Using Axis EmailWS-1.6 to send an HTML email


I am currently limited to the usage of Tomcat with Axis2 and its EmailWS-1.6 webservice to send an email. This has to be an HTML mail.

This is the configuration of EmailWS.properties

Email Service Configuration
(This configuration requires EmailWS-1.6 or later)
contentType=text/html;charset=utf-8
returnAddress=

mail.transport.protocol=smtp
mail.host=
mail.smtp.port=465
mail.smtp.auth=true
mail.smtp.socketFactory.port=465
mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory
mail.smtp.socketFactory.fallback=false
mail.smtp.starttls.enable=true
mail.smtp.quitwait=false

authUsername=
authPassword=

I can succesfully send an email, but it seems to arrive as plain text. The email client does not translate it to HTML. What is the proper configuration of Tomcat/Axis2 to do this?


Solution

  • Tomcat Axis2 Email webservices also contains an operation which enables you to send an xml-based email message. By using this operation, I was able to send the HTML email. It was also received as HTML.