D
denoxis
Hi,
I have a mystery to solve. It is a mystery because it happens randomly.
In the ASP page that is in question, I build a large string (no more
than 10K) which is basically an email template in HTML format. Then I
replace the parts with the values, which are also strings with the size
of 1-2 KB.
For example:
order_summary = generateOrderSummary() 'This HTML string is no more
than 4-5 KB
send_email (order_summary, to_sales_department) 'This email goes to
sales dept, they receive it OK.
email_body = readFromFile("HTML_email_template.html") ' This is 10KB
email_body = replace (email_body, "<!-- NAME -->", billing_name)
email_body = replace (email_body, "<!-- ORDER SUMMARY -->",
order_summary)
email_body = replace (email_body, "<!-- OTHER -->", other_stuff)
send_email (email_body, to_customer) ' They sometimes receive trimmed
order summary.
Here is the mystery: sometimes recipients complain that their order
confirmation is wrong because it seems order_summary part is trimmed.
They fw me the email and yes it was trimmed, however the rest of the
email is OK: just the order_summary in the middle of the email was
messed up. Since order_summary shows OK on the first email, and not on
the second email I concluded that there must be something with the
replace function. It doesn't happen a lot, there are only 2 known cases
out of couple thousands. It is not order-specific either, I place the
same order and order_summary shows OK.
Any suggestions on how to isolate the problem?
Have you encountered the same/similar problems with strings?
I use ASP 3.0 on IIS 6.0. Server is Windows 2003.
Thanks
Deniz
I have a mystery to solve. It is a mystery because it happens randomly.
In the ASP page that is in question, I build a large string (no more
than 10K) which is basically an email template in HTML format. Then I
replace the parts with the values, which are also strings with the size
of 1-2 KB.
For example:
order_summary = generateOrderSummary() 'This HTML string is no more
than 4-5 KB
send_email (order_summary, to_sales_department) 'This email goes to
sales dept, they receive it OK.
email_body = readFromFile("HTML_email_template.html") ' This is 10KB
email_body = replace (email_body, "<!-- NAME -->", billing_name)
email_body = replace (email_body, "<!-- ORDER SUMMARY -->",
order_summary)
email_body = replace (email_body, "<!-- OTHER -->", other_stuff)
send_email (email_body, to_customer) ' They sometimes receive trimmed
order summary.
Here is the mystery: sometimes recipients complain that their order
confirmation is wrong because it seems order_summary part is trimmed.
They fw me the email and yes it was trimmed, however the rest of the
email is OK: just the order_summary in the middle of the email was
messed up. Since order_summary shows OK on the first email, and not on
the second email I concluded that there must be something with the
replace function. It doesn't happen a lot, there are only 2 known cases
out of couple thousands. It is not order-specific either, I place the
same order and order_summary shows OK.
Any suggestions on how to isolate the problem?
Have you encountered the same/similar problems with strings?
I use ASP 3.0 on IIS 6.0. Server is Windows 2003.
Thanks
Deniz