File: app_i18n_mail.pl

package info (click to toggle)
libmojolicious-plugin-i18n-perl 1.60-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 136 kB
  • sloc: perl: 472; makefile: 2
file content (21 lines) | stat: -r--r--r-- 446 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env perl
use common::sense;
use lib qw(../lib ../../mojox-loader/lib ../../mojolicious-plugin-mail/lib ../../mojo/lib);

use MojoX::Loader;

my $self = MojoX::Loader->load;
warn $self->app->test;

warn my $mail = $self->render_mail('test', hall => {id => 1, title => 'test'});

$self->mail(
	to     => 'sharifulin@gmail.com',
	type   => 'multipart/mixed',
	attach => [
		{
			Type     => 'text/html',
			Data     => $mail,
		},
	],
);