I am trying to send an email through php using the mail() function built into php. This is no problem. I am know trying to write an XML document that will be sent through email using php
I know the basic setup of xml but i do not know how sending through php via email will affect the document. Below is how I thought I would have to send it.
$xml="<?xml version=\"1.0\"?>\n";
$xml.="<info>\n";
$xml.="<header>Below is the result of your feedback form</header>\n";
$xml.="<find>$find</find>\n";
$xml.="<other>$other</other>\n";
$xml.="<name>$name</name>\n";
$xml.="<zip>$zip</zip>\n";
$xml.="<workPhone>$workPhone</workPhone>\n";
$xml.="<homePhone>$homePhone</homePhone>\n";
$xml.="<contact>$contactMe</contact>\n";
$xml.="<comments>$comments</comments>\n";
$xml.="</info>\n";
the $xml will be the message variable sent through the mail function:
mail($to, $sub, $xml, $headers);
this document will be pulled from a third party database which unfortunately i only know it only accepts XML.
Will this work? Do I need any special header tags.
Any help on this would be wonderful. I appreciate your time. Thanks