How can i use sendmany

the command is just like the following:
./src/zcash-cli sendmany “$fromaccount” “{"$address":123}”,then error
“error: {“code”:-4,“message”:“Transaction commit failed”}” comes up
in my wallet,i find the $fromaccount is “”,i dont know if it is the reason that the command executed failed

If the coin is mined by you , and you want to send them to another taddr , you should do this by step

  1. send the coin from the taddr to zaddr of yours
  2. send them from zaddr to a taddr of yours
  3. last , you can use z_sendmany

./src/zcash-cli listunspent
./src/zcash-cli z_sendmany “$TADDR” “[{"address": "$ZADDR", "memo": "48656c6c6f20ceb221", "amount": 1.23}]”
./src/zcash-cli z_sendmany $ZADDR “[{"address": "$TADDR", "amount": 5.0}]”
./src/zcash-cli z_sendmany $TADDR “[{"address": "$FRIEND_TADDR", "amount": 4.0}]”

hmmm,maybe u r riight,but what is the use of sendmany… and it seems like if i create a transacton from protected addr, then this problem will be there for ever
it seems like it is a bug