I'm having problems building an HTML e-mail in one template and passing it
back as a variable to the calling template to then send it.
The GenerateInvoice tag builds the Invoice as a webpage, ready to send with
CFMAIL and TYPE="HTML". That bit works fine. If you output
#variables.Invoice# to the page, you get a page that displays as expected
and that HTMLValidator says is OK.
#variables.Invoice#
Running the template produces a blank HTML e-mail which (if you do View
Source in Outlook) appears to have no content. The To, From and Subject
Fields are fine.
If you delete TYPE="HTML" and set variable.Invoice in GenerateInvoice to any
old rubbish, it works fine.
Does anyone have any ideas what might be happening? GenerateInvoice is
below...
Thanks if you can offer any advice.
GenerateInvoice.cfm
SELECT Invoices.Company,
Invoices.CustomerID,
Invoices.Customer,
Invoices.InvoiceDate
FROM Invoices
WHERE Invoices.InvoiceID = #attributes.InvoiceID#;
SELECT Customers.ClientUID
FROM Customers
WHERE Customers.CustomerID = #GetInvoice.CustomerID#;
SELECT InvoiceItems.*
FROM InvoiceItems
WHERE InvoiceItems.InvoiceID = #attributes.InvoiceID#;
Invoice">
Invoice">
From" &
Replace(GetInvoice.Company, request.CrLf, "", "all") & "">
To" &
Replace(GetInvoice.Customer, request.CrLf, "", "all") & "">
Invoice No: " &
attributes.InvoiceID & "">
Customer No: " &
GetClientUID.ClientUID & "">
DetailsNet AmountVAT
Amount">
" &
InvoiceItem>
From: " &
DateFormat(PeriodFrom, "dd/mm/") & " To: " & DateFormat(PeriodTo,
"dd/mm/")>
">
" &
DecimalFormat(NetAmount) & "">
" &
DecimalFormat(VATAmount) & "">
">
Total Net" &
DecimalFormat(variables.TotalNet) & "">
Total VAT" &
DecimalFormat(variables.TotalVAT) & "">
">
Invoice Total" &
DecimalFormat(variables.TotalNet) & "">
">
">
--
Aidan Whitehall <[EMAIL PROTECTED]>
Netshopper UK Ltd
Advanced Web Solutions & Services
http://www.netshopperuk.com/
Telephone +44 (01744) 648650
Fax +44 (01744) 648651
~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists