Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
631 views
in Technique[技术] by (71.8m points)

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

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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 :-))


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...