Improved error handling.
This commit is contained in:
parent
b07e257ac5
commit
ef71c4b2ec
1 changed files with 3 additions and 0 deletions
|
@ -32,6 +32,9 @@ class Observer::Ticket::Article::FillupFromEmail < ActiveRecord::Observer
|
||||||
|
|
||||||
# set sender
|
# set sender
|
||||||
email_address = ticket.group.email_address
|
email_address = ticket.group.email_address
|
||||||
|
if !email_address
|
||||||
|
raise "No email address found for group '#{ticket.group.name}'"
|
||||||
|
end
|
||||||
system_sender = "#{email_address.realname} <#{email_address.email}>"
|
system_sender = "#{email_address.realname} <#{email_address.email}>"
|
||||||
if Setting.get('ticket_define_email_from') == 'AgentNameSystemAddressName'
|
if Setting.get('ticket_define_email_from') == 'AgentNameSystemAddressName'
|
||||||
seperator = Setting.get('ticket_define_email_from_seperator')
|
seperator = Setting.get('ticket_define_email_from_seperator')
|
||||||
|
|
Loading…
Reference in a new issue