如何通过spring框架使用xls attacment发送邮件

时间:2021-04-30 18:12:12

I am working on below environment:

我正在以下环境工作:

  • Spring 3.0.5
  • JDK 1.6

After some specific operation, need to send a mail with attached xls file to specified mails. Presently i have raw data which need to write in xls file.

经过一些特定的操作后,需要将带有附加xls文件的邮件发送到指定的邮件。目前我有需要在xls文件中写入的原始数据。

Have search how to attach file in spring framework while sending mail. But want to know byte Array format which will be rendered in specified column & row of xls file. Actually need to created xls file on the fly through string raw data.

发送邮件时搜索如何在spring框架中附加文件。但是想知道将在xls文件的指定列和行中呈现的字节数组格式。实际上需要通过字符串原始数据动态创建xls文件。

Any better way to attach xls file while sending mail through spring will be welcomed. :)

在春季发送邮件时,任何更好的方法来附加xls文件都会受到欢迎。 :)

1 个解决方案

#1


0  

Apache POI will help with creating the xls file.

Apache POI将有助于创建xls文件。

JavaMail will send the mail message. I'm sure there's a Spring-specific way of using JavaMail as well.

JavaMail将发送邮件消息。我确信有一种特定于Spring的方式也可以使用JavaMail。

#1


0  

Apache POI will help with creating the xls file.

Apache POI将有助于创建xls文件。

JavaMail will send the mail message. I'm sure there's a Spring-specific way of using JavaMail as well.

JavaMail将发送邮件消息。我确信有一种特定于Spring的方式也可以使用JavaMail。