imgrooot Posted January 29, 2020 Share Posted January 29, 2020 This is my first time working with ADF. I've been researching and found this link. http://adfxml.info/adf_spec.pdf Apprantly ADF uses XML to format data. So say I have a car dealer that wants to receive leads in ADF format like this example. How do I go on about emailing this as an attachment? If I am using a PHPmailer, it requires a physical file to attach. So how do I save the bottom xml info as an attachment? Which file extension do I use? <?ADF VERSION "1.0"?> <?XML VERSION “1.0”?> <adf> <prospect> <requestdate>2000-03-30T15:30:20-08:00</requestdate> <vehicle> <year>1999</year> <make>Chevrolet</make> <model>Blazer</model> </vehicle> <customer> <contact> <name part="full">John Doe</name> <phone>393-999-3922</phone> </contact> </customer> <vendor> <contact> <name part="full">Acura of Bellevue</name> </contact> </vendor> </prospect> </adf> Quote Link to comment Share on other sites More sharing options...
chhorn Posted January 29, 2020 Share Posted January 29, 2020 I bet the mailer won't care about any file extension, just use the one you expect it to be when the client opens the mail, at least then it would be a file anyway. Quote Link to comment Share on other sites More sharing options...
Barand Posted January 29, 2020 Share Posted January 29, 2020 If you currently have that data in a string variable only, then file_put_contents() Quote Link to comment Share on other sites More sharing options...
kicken Posted January 29, 2020 Share Posted January 29, 2020 7 hours ago, imgrooot said: If I am using a PHPmailer, it requires a physical file No, it doesn't. addStringAttachment $mailer->addStringAttachment($adfData, 'lead.adf'); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.