1

I've read this guide in order to create a new email directly with Windows Live Mail from a batch file but I have problem with the double quotes.

This is my batch file:

@echo off
"C:\Program Files\Windows Live\Mail\wlmail" /mailurl:mailto:"mymail@gmail.com?subject=blabla&body=Hi there"
exit

This give me the following result in the WLM window:

To: "mymail@gmail.com

subject: blabla

body: Hi There"

I have one problem:

  • The double quotes appear before the recipient and at the end of the body.

I tried:

"C:\Program Files\Windows Live\Mail\wlmail"
  /mailurl:mailto:mymail@gmail.com?subject=blabla&body=Hithere

To: mymail@gmail.com

subject: blabla

body: (empty)

or:

"C:\Program Files\Windows Live\Mail\wlmail"
  /mailurl:mailto:"mymail@gmail.com?subject=blabla&body=Hi there

To: "mymail@gmail.com

subject: blabla

body: Hi There

Any help would be appreciated!

PS: the "Mailto URL Encoder" of the guy make things worste.

dbenham
  • 127,446
  • 28
  • 251
  • 390
remyremy
  • 3,548
  • 3
  • 39
  • 56

1 Answers1

2

I don't use Windows Mail or any Microsoft mailer, but I guess that this should work for you.

"C:\Program Files\Windows Live\Mail\wlmail" 
     /mailurl:mailto:mymail@gmail.com?subject=blabla^&body=Hithere

As your sample looks quite correct, but the & before body= will split the command line into two parts, and now the caret ^ escapes it, so the body should be visible.

jeb
  • 78,592
  • 17
  • 171
  • 225