diff options
author | Jonathan Prykop <jonathan@freeside.biz> | 2015-10-20 20:56:13 -0500 |
---|---|---|
committer | Jonathan Prykop <jonathan@freeside.biz> | 2015-12-22 03:10:18 -0600 |
commit | 7461526f923d4cc9341b5bbebad3bf409b778120 (patch) | |
tree | a0a395c4836066010abf2a46c003a2e5e372773a /FS/FS/msg_template/email.pm | |
parent | 796750496ab90b7e10823e2a3a008b600ab8f090 (diff) |
RT#38217 Send email when logging conditions are met [v4 merge]
Diffstat (limited to 'FS/FS/msg_template/email.pm')
-rw-r--r-- | FS/FS/msg_template/email.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/FS/FS/msg_template/email.pm b/FS/FS/msg_template/email.pm index 5f27370..4b43306 100644 --- a/FS/FS/msg_template/email.pm +++ b/FS/FS/msg_template/email.pm @@ -164,7 +164,7 @@ Options are passed as a list of name/value pairs: =item cust_main -Customer object (required). +Customer object =item object @@ -215,7 +215,7 @@ sub prepare { my( $self, %opt ) = @_; my $cust_main = $opt{'cust_main'}; # or die 'cust_main required'; - my $object = $opt{'object'} or die 'object required'; + my $object = $opt{'object'}; # or die 'object required'; my $hashref = $self->prepare_substitutions(%opt); @@ -365,7 +365,7 @@ sub prepare { my $env_to = join(', ', @to); my $cust_msg = FS::cust_msg->new({ - 'custnum' => $cust_main->custnum, + 'custnum' => $cust_main ? $cust_main->custnum : '', 'msgnum' => $self->msgnum, '_date' => $time, 'env_from' => $env_from, |