Forum OpenACS Development: Re: html in emails.

7: Re: html in emails. (response to 6)
Posted by Richard Hamilton on
The simple modification above broke the basic default emails for confirming registrations to I added this simple check to ns_sendmail and it seems to be working fine. I have only just started working with tcl so my repertoire of instructions is not good. Perhaps the tcl experts could let me know if this is an efficient way to construct it.
if {[string index $body 0] != "\n"} {
    	set newline "\n"
    } else {
    	set newline ""

    append msg $newline "$body\n"

I was not sure if I had to explicitly tell the interpreter that newline contains null so I thought I had better for safety's sake.