Voicemail to Email Help : Looking for Shell command

Do you know where is the functionality for sending out a voicemail as an attachment to an email address is embedded within the config files?

I have cleared all the logs, and left a voicemail so that I get it via email also.

From the logs of the call, I see that the macro-vm is used for voicemail functionality. It is within extensions_additional.conf.

However, I unable to locate the the “Voicemail to Email” part. Perhaps, the code written there is too high in comparison to the experience I have with Dial Plan programming.

So… far I have been able to get around with most of the functionality using the “mail” function.

I can also easily use my dialplan variables easily within the “System” command.

Now I am trying to send an attachment. That is “.wav” file. I think that is not possible with the mail command ?

Any other good commands to send email with attachment using the shell ?

Here is a simple question,

How do I send an email with “.wav” file as an attachment using the shell or command line ?

the function mail cannot do that.

I have tried “mutt” , it sends the attachment but it is an unreadable format.