First go register for a gmail account that will be used for this purpose. If you already have one to use for this purpose, great.
Now that you have that, lets go and make some changes to the system.
cd /etc/ssmtp
cp ssmpt.conf ssmtp.conf.bak
sudo nano ssmtp.conf
In here will be a few things to add
mailhub=smtp.gmail.com:465
Remove the # from UseTL
UseTLS=YES
Add the following fields without quotes around the gmail name or password.
AuthUser='gmail name'
AuthPass='password'
Save this file and exit out of it.
Now lets go modify our mdadm.conf file.
sudo nano /etc/mdadm.conf
Add the below record, again without quotes around the email account.
MAILADDR '[email protected]'
Save the file and exit
Now to test the email settings.
sudo mdadm --monitor --scan --test -1
There you have it, MDADM Disk Array monitoring for your Software Array on Xen Server.