|
|
@ -64,16 +64,16 @@ if ($email_add) { |
|
|
|
my $template_res = $template2->output(); |
|
|
|
|
|
|
|
# Analysing information and getting mail properties |
|
|
|
if ($template_res =~ /§SUBJECT§\n(.*)\n§END_SUBJECT§/s) { $mail{'subject'} = $1; } |
|
|
|
if ($template_res =~ /<SUBJECT>\n(.*)\n<END_SUBJECT>/s) { $mail{'subject'} = $1; } |
|
|
|
else { $mail{'subject'} = "no subject"; } |
|
|
|
|
|
|
|
my $email_header = ""; |
|
|
|
if ($template_res =~ /§HEADER§\n(.*)\n§END_HEADER§/s) { $email_header = $1; } |
|
|
|
if ($template_res =~ /<HEADER>\n(.*)\n<END_HEADER>/s) { $email_header = $1; } |
|
|
|
|
|
|
|
my $email_file = "basket.txt"; |
|
|
|
if ($template_res =~ /§FILENAME§\n(.*)\n§END_FILENAME§/s) { $email_file = $1; } |
|
|
|
if ($template_res =~ /<FILENAME>\n(.*)\n<END_FILENAME>/s) { $email_file = $1; } |
|
|
|
|
|
|
|
if ($template_res =~ /§MESSAGE§\n(.*)\n§END_MESSAGE§/s) { $mail{'body'} = $1; } |
|
|
|
if ($template_res =~ /<MESSAGE>\n(.*)\n<END_MESSAGE>/s) { $mail{'body'} = $1; } |
|
|
|
|
|
|
|
my $boundary = "====" . time() . "===="; |
|
|
|
$mail{'content-type'} = "multipart/mixed; boundary=\"$boundary\""; |
|
|
|