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

前端 未结 5 1806

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

    According to these docs the command you need is

    "path/to/Outlook.exe /c ipm.note /a \"path/to/attachment\""
    

    Assemble this and run it via ProcessBuilder

    (Or listen to MarcoS who gives a very good example of why it's sometimes better not to literally answer questions :-))

提交回复
热议问题