projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git]
/
FS
/
FS
/
msg_template
/
email.pm
diff --git
a/FS/FS/msg_template/email.pm
b/FS/FS/msg_template/email.pm
index
f8ebfa0
..
377dbb1
100644
(file)
--- a/
FS/FS/msg_template/email.pm
+++ b/
FS/FS/msg_template/email.pm
@@
-200,6
+200,12
@@
A hash reference of additional substitutions
A string identifying the kind of message this is. Currently can be "invoice",
"receipt", "admin", or null. Expand this list as necessary.
A string identifying the kind of message this is. Currently can be "invoice",
"receipt", "admin", or null. Expand this list as necessary.
+=item override_content
+
+A string to use as the HTML body; if specified, replaces the entire
+body of the message. This should be used ONLY by L<FS::report_batch> and may
+go away in the future.
+
=back
=cut
=back
=cut
@@
-265,6
+271,12
@@
sub prepare {
warn "$me filling in body template\n" if $DEBUG;
$body = $body_tmpl->fill_in( HASH => $hashref );
warn "$me filling in body template\n" if $DEBUG;
$body = $body_tmpl->fill_in( HASH => $hashref );
+ # override $body if requested
+ if ( $opt{'override_content'} ) {
+ warn "$me overriding template body with requested content" if $DEBUG;
+ $body = $opt{'override_content'};
+ }
+
###
# and email
###
###
# and email
###
@@
-448,17
+460,10
@@
sub content {
=cut
=cut
-=back
-
-=head2 CLASS METHODS
-
-=over 4
-
=item send_prepared CUST_MSG
=item send_prepared CUST_MSG
-Takes the CUST_MSG object and sends it to its recipient. This is a class
-method because everything needed to send the message is stored in the
-CUST_MSG already.
+Takes the CUST_MSG object and sends it to its recipient. The "smtpmachine"
+configuration option will be used to find the outgoing mail server.
=cut
=cut