My colleagues at work frequently need to send me a specific file (I have exact path) from their computer. They all use different email clients so I cannot use COM.
Is there any other way to automate (or semi-automate) this? I would send them a script which would copy the file and paste it (attach it) to a new email message to me.
Any idea is appreciated, thanks!
Copy file and attach it to email?
Re: Copy file and attach it to email?
an example , thunderbird send an attached file
Code: Select all
filex =c:\test.jpg ;- file to attach
ifnotexist,%filex%
{
msgbox,%filex% not exists .
exitapp
}
tox =garry(at)gmail.com ;- << change adress
subject =Test55
body =FollowedLine1`%0AFollowedLine2
TO=to='%TOX%'
PR=%A_ProgramFiles%\Mozilla Thunderbird\thunderbird.exe
SB=subject=%subject%
AT=attachment='%FILEX%'
BD=body=Hello M3user`%0A`%0AHow are you ?`%0A`%0A%body%`%0A`%0AGreetings`%2C`%0A`'`%09`%09%x%`%0A`%0A`%0AEND
ALL=%TO%,%SB%,%AT%,%BD%
run,%PR% -compose "%ALL%"
exitapp
Re: Copy file and attach it to email?
I think that the question is how to do it for any e-mail client. As far as I know, mailto: does not handle this directly as part of the protocol. COM may be possible, though the message would not necessarily be "inserted" into a specific client's mailbox in doing that. One could determine which client is being used as the mail default, and customize a command line, where supported, for that client. Although many clients exist, I believe that only a small fraction of people use clients outside a small set. One could also use a Web server to host documents that could be downloaded or accessed in a variety of ways. Gmail is another story altogether....
Re: Copy file and attach it to email?
Thanks, this makes sense. Is there a way to determine the default email client?