Using Project Custom Field as Return-Path in notification emails
We are on redline 3.0.1
Each Project will have 1 Custom Field.
We would like to use the value in this Custom Field to replace the default Return-Path value in email header.
I tried a quick and dirty method of setting it but it doesn't work.
It seems that the value is not obtained at all.
It would be nice if someone can help with this!
The change in vendor/bundle/ruby/2.0.0/gems/mail-2.6.3/lib/mail/message.rb :
# mail.smtp_envelope_from 'Mikel <firstname.lastname@example.org>' # mail.smtp_envelope_from #=> 'email@example.com' def smtp_envelope_from( val = nil ) val = issue.project.custom_field_values [ 0 ].value <---------------- new line if val self.smtp_envelope_from = val else @smtp_envelope_from || return_path || sender || from_addrs.first end end