I have an order form where a list of about 20-30 products are stored in a repeatable region. Customers enter quantities for the items they want and when they submit the form, it sends an email to the site owner and redirects to a thank you page that summarizes the order. There's no payment involved.
The issue I'm having is with white space in the generated email. I loop through the repeatable region, displaying products that have been ordered and calculating totals while ignoring those that haven't. This leaves a lot of extraneous newlines with each iteration of the loop. It doesn't matter on an html page, but in the text email each newline and indentation is faithfully reproduced, leaving big gaps in the email.
I'm wondering if there is any way of managing the white space created while generating the content of the send_mail tag. To complicate the matter, I want to leave intentional line breaks while removing extraneous ones. I suppose I could enable html in the send_mail tag to create a clean format, but I'd prefer to send plain text. I worry (maybe unnecessarily) about spam and junk filters looking askance at the html when replying to customers' orders.
The issue I'm having is with white space in the generated email. I loop through the repeatable region, displaying products that have been ordered and calculating totals while ignoring those that haven't. This leaves a lot of extraneous newlines with each iteration of the loop. It doesn't matter on an html page, but in the text email each newline and indentation is faithfully reproduced, leaving big gaps in the email.
I'm wondering if there is any way of managing the white space created while generating the content of the send_mail tag. To complicate the matter, I want to leave intentional line breaks while removing extraneous ones. I suppose I could enable html in the send_mail tag to create a clean format, but I'd prefer to send plain text. I worry (maybe unnecessarily) about spam and junk filters looking askance at the html when replying to customers' orders.