-1

I've been trying to open a mail client (does not have to be outlook) in windows with specified attachment

Using mailto option does not open with the attachment and using thunderbird commandline does not work in window machine.

Will there be any way to solve this problem (using any of the javascript/python/shell)

jinjineos
  • 157
  • 9

1 Answers1

0

There is no generic way of doing that for all email clients, but for Outlook you can use a script (VBS) similar to the one below. JS or Python will be very similar.

set App = CreateObject("Outlook.Application")
set Item = App.CreateItem(0)
Item.Subject = "test"
Item.Attachments.Add "c:\temp\test.txt"
Dmitry Streblechenko
  • 62,942
  • 4
  • 53
  • 78