3

The following command:

thunderbird -compose to=abc@example.com,subject=testmail,body="something"

works, but only if it has no comma in the body tag. It works with:

"dsafdsafcc \/sda/fads ;.f af af a"

But it won't work if instead of a ; a put a , . Alternatives, like \, also don't work. The , seems to break any string that I pass to body.

How can I pass a complete text to body, with ,, and new lines?

1

I think you need to wrap the contents of the body="' ...something...'" to get what you want:

$ thunderbird –compose "to='foo@bar.com',subject='nice tip',body='Check out this neat command line tip'"

You can also put the contents of the body in a file and send it like this:

$ thunderbird –compose "to='foo@bar.com',subject='nice tip',body='$(cat somefile.txt)'"
  • Nope, it doesn't work. But thunderbird -compose to=abc@example.com,subject=testmail,"body='dsafdsafcc\, \/sda/fads ,.f af af a'" (wrapped body tag), works! – François Perenot Jul 30 '13 at 20:45
  • @FrançoisPerenot - I think you can put the body in a file and do this: ...,body='$(cat somefile.txt)'". – slm Jul 30 '13 at 21:00
  • @FrançoisPerenot - so just the ,, doesn't work? What's left to your question? – slm Jul 30 '13 at 21:20
  • Everything works now, ',,' when I do what I say in the first comment, multiline, when I save to a file and use a variable to load it. – François Perenot Jul 30 '13 at 23:57
  • @FrançoisPerenot - if this resolves your issue can you please mark this answer as accepted so others know that your issue has been resolved. Thanks. – slm Jul 31 '13 at 0:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.