I am assuming here that you have Asterisk Based phone system which has web based PBX management interface.
First we need to login to PBX, Input PBX IP in browser and login with username and password.
Go to Applications tab, You will see extension here. There is a voicemail tab, click on that and enable it. Input voicemail password, provide name address and enable Email attachment, Play CID and Play envelope then Sumit it. You can take reference from below screenshot.
Set Voicemail Admin
On PBX main interface, click on settings, select voicemail admin. Click on setting beside usage then Email config.
Input required fields as per your requirement and scroll down at bottom. In server email field provide right email address.
System Admin Module
I advise to get system admin pro module as it has lots of features and it comes just for $25, one time cost.
If you already have it you can use your own SMTP, office365 or gmail account as voicemail sender.