Hi All,

 

My plan is to use Catalyst::Plugin::RunAfterRequest for sending email via
Catalyst::View::Email as the background.

Due to sometimes mail server got lag and the page waiting for it or sending
a notification after slow processes have been completed e.g. import/export.

 

I'm not sure it's a bug or the limitation of the plugin.

I setup the code something like this:

 

$c->run_after_request( 

  sub {

    $c->stash->{email} = {

      from => $from,

      to => $to,

      body => $body,

      header => [

        Subject => 'some localized subject',

      ],

    };

    $c->forward( $c->view('Email') );

  }

);

 

After running it, it showed an error like this:
[error] Caught exception in engine "Modification of non-creatable array
value attempted, subscript -1 at
C:/strawberry/perl/site/lib/Catalyst/Dispatcher.pm line 278."

 

As a trial, the error caused from this line: $c->forward( $c->view('Email')
);.

Finally, I noticed it worked well with other forwarding except view.

 

Please kindly let me know how to fix this issue or another solution that
matches to the requirements.

 

Thanks in advance,

Chakkit

 

_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to