Forum OpenACS Development: Re: Get the notification message different

Collapse
Posted by Raad Al-Rawi on

Hi Vamshi


You could implement a change to the notifications code in order to achieve what you want, by changing the reply_address proc in packages/notifications/tcl/notification-email-procs.tcl:

Amend the line:

return "[address_domain] mailer <[reply_address_prefix]-$object_id-$type_id@[address_domain]>"

to

return "[reply_address_prefix]-[acs_object_name $object_id]@[address_domain]>"

Don't forget that the notifications package parameters EmailDomain and EmailReplyAddressPrefix need to be set according to what you want.

I don't know if this can break due to a failure to find the object name, so I can't guarantee it will work sensibly in all cases but it might do the trick.

It would be good to expose/parameterise this in the UI somehow, in case people don't want to use the reply-by-email feature. Maybe another parameter ObjectNameInReplyAddress? Any volunteers? :)

HTH

 

<Raad>

Collapse
Posted by Vamshi Krishna Kaniganti on
thanks Raad
i have tried this method long back but could not get the solution so i have posted in the forums, please help me out doing i am doing some where wrong i could not get it

the mails are comming as i said before in my post,

This was the code i implemented to test it ,
**********************************************

  #adding the name to the object id instead of id
        db_0or1row  object {select acs_object.name(temp.context_id) as object_name from (select context_id from acs_objects where object_id = :object_id) temp }
sss
            return "[address_domain] mailer <[reply_address_prefix]-$object_name-$type_id@[address_domain]>"

Thanks
vamshi