[sylpheed:36821] Re: Windows - associate sylpheed to right click menu "send to mail recipient"

Michael Weiner spam at cogit.net
Thu Jun 6 02:03:24 JST 2019

OK, that is the key info we needed. 

You can simply insert into the SendTo directory a link to a VBS
file containing the following three lines.

 Set WshShell = WScript.CreateObject("WScript.Shell")
 runCmd = "[pathToSylpheed]\sylpheed.exe --attach " & WScript.Arguments(0)
 WshShell.Run "cmd /c " & runCmd, 0, True

In the last line, "0" means hide the command window, and "True" means
that any error codes will be returned.

This works for just a single attachment, since WScript.Arguments(0) refers
to the first command-line argument.



On Wed, 5 Jun 2019 18:10:38 +0200, Joe <joe.on.list at gmail.com> wrote:
> On Wed, Jun 5, 2019 at 4:04 PM Michael Weiner <spam at cogit.net> wrote:
> >
> > I believe that the issue is "Send to"-- from the Windows Explorer
> > context menu-- rather than "mailto:". "Mailto:" is easy to fix.
> > "Send to" appears more difficult. I have not found a fix yet.
> > Although one can insert a Windows file shortcut to Sylpheed into
> > the "Send to" directory, sending a file to that shortcut does not
> > attach it to a new message in a composition window. Instead, the
> > Sylpheed viewer window attempts to display the file.
> >
> > The "Send to" directory is listed below.
> >
> > C:\Users\[username]\AppData\Roaming\Microsoft\Windows\SendTo\
> Exactly, that is the matter...
> I'm a bit surprised nobody of you users tested this problem.Likely
> this list and more in general sylpheed client is not so used by
> windows users... :)
> Anyway a quick solution i found is to write a little batch file (.bat
> dos/win script) that call the command:
> sylpheed --attach %1
> %1  -stand for the first argument the script was passed by explorer
> (when you right-click a file and choose send-to, and then
> mail-recipient, that file is passed to the mail compose program as
> "the first argument").
> I experienced that the above script has to be placed in the sylpheed
> install directory:
> c:\program files (x86)\sylpeed\batch-file.bat
> And then a new link has to be created under "send to" dir:
> C:\Users\[username]\AppData\Roaming\Microsoft\Windows\SendTo
> \link-to-batch-file.lnk
> I don't know why but it doesn't work if you create a symlink from
> windows shellprompt, you have to open that dir, right click in it,
> and then create new link, choose sylpheed batch file.
> We can also name it as similar to "Mail Recipient" or so on...
> Now, if I right click a file (or even more files at once) and choose
> "send to" > "Mail Recipient"...
> Here we go, sylpheed opens-up its compose window, selected files
> appear attachedto the new message. We can edit recipient, subject
> body an finally send.
> Anyway I noticed one other problem linked to this particular solution.
> batch script use to run in a dos window...
> Also in this case, when sylpheed opens up, also a black dos windows
> appears, and persists open. It is not a very clean behavior and I'd
> like to find a work around.
> Seems a way could be to write a VB script that call our batch script
> that recallsylpheed command. May be we just need a vbs file only,
> the runs sylpheed commandand pass to it the first argument explorer
> give to it when right click the file to attach.
> Is there anybody out there able to write down a VB solution as
> explained? If thanks to my poor english I wasn't clear enough, let me
> know, I'll try to repeat again.
> As recap:
> - visual basic script that
> - get the first argument passed by explorer
> - and send this argument (fil we want to attach) to sylpheed command:
>  c\program files (x86)\sylpheed\sylpheed --attach "$ARGUMENT"
> I'm a linux user and don't know visual basic at all. I tried to copy
> some example but they didn't work...
> I tried to install sylpheed on a pc at office, it is used by some
> windows 7 users (really basic users!).
> Anyway, thanks for your replies!  :)
> Bye!

More information about the Sylpheed mailing list