I noticed Malte added this code to acs-mail-lite after posting:
# The CC E-Mail is unknown in the system. Create the person.
if {[string eq "" $party_id]} {
if {[regexp {(.+)[\.|_](.+)@(.+)} $email_addr match first_names last_name url]} {
set name "$first_names $last_name"
} else {
set name $email_addr
set first_names "."
set last_name [lindex [split $email_addr "@"] 0]
}
if {$contacts_p} {
set party_id [contacts::person::new -email $email_addr -first_names $first_names -last_name $last_name]
ns_log Notice "Contact generated for $first_names $last_name at $email_addr"
} else {
set party_id [person::new -email $email_addr -first_names $first_names -last_name $last_name]
ns_log Notice "Person generated for $first_names $last_name at $email_addr"
}
}
Now we have contacts specific code in an essential package.
Can someone fill me in on the best way to prevent Malte's contacts code from creeping into acs-mail-lite?
Carl
P.S. Malte, why are you adding strangly named people to the system using person::new? Will this effect future registrations if someone has been "added" earlier through inclusion in an email exchange within the contacts package?