notification::email::address_domain (public)

 notification::email::address_domain

Defined in packages/notifications/tcl/notification-email-procs.tcl

Get the domain name to use for e-mail. The package parameter "EmailDomain" is preferred, but if it doesn't exist, we build one using the system URL.

Partial Call Graph (max 5 caller/called nodes):
%3 notification::email::bounce_mail_message notification::email::bounce_mail_message (public) notification::email::address_domain notification::email::address_domain notification::email::bounce_mail_message->notification::email::address_domain notification::email::reply_address notification::email::reply_address (private) notification::email::reply_address->notification::email::address_domain ad_url ad_url (public) notification::email::address_domain->ad_url notification::email::get_package_id notification::email::get_package_id (public) notification::email::address_domain->notification::email::get_package_id parameter::get parameter::get (public) notification::email::address_domain->parameter::get

Testcases:
No testcase defined.
Source code:
        set domain [parameter::get -package_id [get_package_id] -parameter "EmailDomain" -default ""]
        if { $domain eq "" } {
            # No domain set up, let's use the default from the system info
            # This may not find anything, but at least it's worth a try
            if { ![regexp {^(https?://)?(www\.)?([^/]*)} [ad_url] match ignore ignore domain] } {
                ns_log Warning "notification::email::address_domain: Couldn't find an email domain for notifications."
            } else {
                regsub -nocase {(.*):.*} $domain "\\1" domain
            }
        }
        return $domain
XQL Not present:
PostgreSQL
Generic XQL file:
packages/notifications/tcl/notification-email-procs.xql

Oracle XQL file:
packages/notifications/tcl/notification-email-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: