varcsv='Product;Quantity\n'+$Xml.SelectAll('Lines/Line',function(line){returnline.Evaluate('Product')+';'+line.Evaluate('Quantity');}).join('\n');$Messages.New('[email protected]','Order lines','The order lines are attached.').AttachString('lines.csv','text/csv',csv).Send();