Commit aea8b929 authored by Kevin Falcone's avatar Kevin Falcone
Browse files

use in memory parsing, otherwise when you have an HTML

  template and _DowngradeToHTML is called, your open filehandles
  will get garbage collected and sending the html email will fail.

git-svn-id: svn+ssh://svn.bestpractical.com/svn/bps-public/rt/3.8/trunk@16171 e417ac7c-1bcc-0310-8ffa-8f5827389a85
parent abccd9b8
......@@ -346,13 +346,10 @@ sub _Parse {
$content = "\n".$content;
}
# Re-use the MIMEParser setup code from RT::EmailParser, which
# tries to use tmpdirs, falling back to in-memory parsing. But we
# don't stick the RT::EmailParser into a lexical because it cleans
# out the tmpdir it makes on DESTROY
my $parser = MIME::Parser->new();
$self->{rtparser} = RT::EmailParser->new;
$self->{rtparser}->_SetupMIMEParser($parser);
$parser->output_to_core(1);
$parser->tmp_to_core(1);
$parser->use_inner_files(1);
### Should we forgive normally-fatal errors?
$parser->ignore_errors(1);
......@@ -438,7 +435,6 @@ sub _ParseContent {
sub _DowngradeFromHTML {
my $self = shift;
my $orig_entity = $self->MIMEObj;
die 'hehe';
local $RT::Transaction::PreferredContentType = 'text/plain';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment