Index: openacs-4/packages/acs-subsite/www/shared/send-email.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/shared/send-email.tcl,v diff -u -r1.7 -r1.7.2.1 --- openacs-4/packages/acs-subsite/www/shared/send-email.tcl 7 Jun 2008 20:28:57 -0000 1.7 +++ openacs-4/packages/acs-subsite/www/shared/send-email.tcl 15 May 2009 15:59:16 -0000 1.7.2.1 @@ -23,43 +23,27 @@ ad_form -name send-email -export {sendto return_url} -form { {from:text(text),optional - {label "From:"} - {html {{disabled ""} {size 40}}} - {value $from} + {label "From:"} + {html {{disabled ""} {size 40}}} + {value $from} } {subject:text(text) - {label "Subject:"} - {html {size 70}} + {label "Subject:"} + {html {size 70}} } {body:text(textarea),nospell - {label "Body:"} - {html {rows 10 cols 55}} - {value ""} + {label "Body:"} + {html {rows 10 cols 55}} + {value ""} } - {copy:text(checkbox),optional - {label "\#acs-subsite.Send_me_a_copy\#"} - {options {{"" 1 }}} - } } -on_submit { + set to [email_image::get_email -user_id $sendto] - if {[catch {ns_sendmail "$to" "$from" "$subject" "$body"} errmsg]} { - ad_return_error "Mail Failed" "The system was unable to send email. Please notify the user personally. \ - This problem is probably caused by a misconfiguration of your email system. Here is the error: -
-                        [ad_quotehtml $errmsg]
-                    
" - return + + if {[catch {acs_mail_lite::send -send_immediately -to_addr $to -from_addr $from -subject $subject -body $body} errmsg]} { + ad_return_error "Mail Failed" "

The system was unable to send email. Please notify the user personally. This problem is probably caused by a misconfiguration of your email system. Here is the error:

+
[ad_quotehtml $errmsg]
" } - if {$copy eq "1"} { - if {[catch {ns_sendmail "$from" "$from" "$subject" "$body"} errmsg]} { - ad_return_error "Mail Failed" "The system was unable to send email. Please notify the user personally. \ - This problem is probably caused by a misconfiguration of your email system. Here is the error: -
-                                [ad_quotehtml $errmsg]
-                            
" - return - } - } } -after_submit { ad_returnredirect $return_url