per quanto riguarda l'xml
www.php.net/simplexml

o
www.php.net/domxml

e poi per l'invio
www.php.net/mail