You need to set the sendMoneyMode to false (true = send money / false = COD)
-> See function ZO_MailSend_SetCoDMode at the bottom of this post.
and then you could use the function MailSend:AttachMoney to specify which amount of COD to use.
But "MailSend" ist not the global variable used ingame so you are not able to use this. It's the "class" and you need to use the created "object" of that class to use the functions.
If you check the code where MailSend gets created via :New or :Initialize you'll get the object name.
It should be:
And these functions may be helping as well:
BUT: As there were addons messing around with the send gold feature it might be not possible for addons to specify to send gold or set the COD from addon code. You need to check it. Sending gold will not be possible for sure!