Getting an java error for mailR package while deploying on shinyapp.io

Hi Community,

I am getting this error in my log while deploying the application on shinyapps.io. The code and the error are mentions below:

library(mailR)
send.mail(from="xyz@gmail.com",
to = "abc@gmail.com",
subject="Testing",
body=HTML(Body),
html=T,
smtp=list(
host.name = "mail.smtp2go.com",
# port = 25,
port = 465,
# port = 587,
user.name = "xyz@gmail.com",
passwd = "xxxxxx",
ssl = T
),
authenticate=T
)

Mention below is the error:

2021-07-12T12:50:41.574289+00:00 shinyapps[4356058]: Warning: Error in send.mail: java.lang.NoClassDefFoundError: javax/activation/DataSource
2021-07-12T12:50:41.578104+00:00 shinyapps[4356058]: [No stack trace available]

Hope we will get a solution for this...!

Hi,
I am getting the same error when deploying application to shinyapps.io. It works fine locally.
Hope someone can help.