to open outlook mail from java program and to attach file to the mail from directory

前端 未结 5 1811

I need to implement Email functionality in my Java application which will open microsoft outlook and attach a file from my directory. Has any implemented the same?

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-06 15:15

    You can open the system's email client using the desktop class.

    Desktop.getDesktop().mail( new URI( "mailto:address@somewhere.com" ) )
    

提交回复
热议问题