eliminate some false laziness in FS::Misc::send_email vs. msg_template/email.pm send_...
[freeside.git] / FS / FS / msg_template / InitialData.pm
1 package FS::msg_template::InitialData;
2
3 sub _initial_data {
4   [
5     { msgname   => 'Password reset',
6       msgclass  => 'email',
7       mime_type => 'text/html', #multipart/alternative with a text part?
8                                   # cranky mutt/pine users like me are rare
9
10       _conf        => 'selfservice-password_reset_msgnum',
11       _insert_args => [ subject => '{ $company_name } password reset',
12                         body    => <<'END',
13 To complete your { $company_name } password reset, please go to
14 <a href="{ $selfservice_server_base_url }/selfservice.cgi?action=process_forgot_password_session_{ $session_id }">{ $selfservice_server_base_url }/selfservice.cgi?action=process_forgot_password_session_{ $session_id }</a><br />
15 <br />
16 This link will expire in 24 hours.<br />
17 <br />
18 If you did not request this password reset, you may safely ignore and delete this message.<br />
19 <br />
20 <br />
21 { $company_name } Support
22 END
23                       ],
24     },
25     { msgname   => 'Refund receipt',
26       msgclass  => 'email',
27       mime_type => 'text/html',
28       _conf        => 'refund_receipt_msgnum',
29       _insert_args => [ subject => '{ $company_name } refund receipt',
30                         body    => <<'END',
31 Dear {$first} {$last},<BR>
32 <BR>
33 The following refund has been applied to your account.<BR>
34 <BR>
35 Refund ID: {$refundnum}<BR>
36 Date:      {$date}<BR>
37 Amount:    {$refund}<BR>
38
39 END
40                       ],
41     },
42     { msgname   => 'System log',
43       msgclass  => 'email',
44       mime_type => 'text/html',
45       _upgrade_journal => 'system_log_email_template',
46       _insert_args => [ subject => '{ $company_name } system log',
47                         body    => <<'END',
48 Level: {$loglevel}<BR>
49 Context: {$logcontext}<BR>
50 <BR>
51 {$logmessage}<BR>
52
53 END
54                       ],
55     },
56   ];
57 }
58
59 1;