Index: openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-advanced.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-advanced.xml,v diff -u -r1.26 -r1.27 --- openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-advanced.xml 11 Jun 2004 10:13:00 -0000 1.26 +++ openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-advanced.xml 23 Jun 2004 23:35:55 -0000 1.27 @@ -454,7 +454,12 @@ - Profile your code + Profile your code + + + by Jade Rubick + + There are several facilities for profiling your code in OpenACS. The first thing to do is to install the developer-support package and play around with it. But there @@ -860,9 +865,54 @@ package. Commonly, you would use ad_conn package_url to build the URL. Otherwise, some of your links may be relative to the virtual directory (note/) instead of the actual directory that the note is - being served from + being served from. + + + Sending HTML email from your application + + by Jade Rubick + + + Sending email is fairly simple using the acs-mail-lite + package. Sending HTML email is only slightly more complicated. + + + set subject "my subject" + + set message "Bold not bold" + + set from_addr "me@myemail.com" + + set to_addr "me@myemail.com" + + set message_type "text/html" + + # the from to html closes any open tags. + set message_html [ad_html_text_convert -from html -to html $message] + + # some mailers chop off the last few characters. + append message_html " " + set message_text [ad_html_text_convert -from html -to text $message] + + set message_data [build_mime_message $message_text $message_html] + + set extra_headers [ns_set new] + + ns_set put $extra_headers MIME-Version [ns_set get $message_data MIME-Version] + ns_set put $extra_headers Content-ID [ns_set get $message_data Content-ID] + ns_set put $extra_headers Content-Type [ns_set get $message_data Content-Type] + set message [ns_set get $message_data body] + + acs_mail_lite::send \ + -to_addr $to_addr \ + -from_addr $from_addr \ + -subject $subject \ + -body $message \ + -extraheaders $extra_headers + + Future Topics