summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlib/JWebmail/Model/Driver/QMailAuthuser/Extract.pm50
-rw-r--r--t/Webmail.t2
2 files changed, 26 insertions, 26 deletions
diff --git a/lib/JWebmail/Model/Driver/QMailAuthuser/Extract.pm b/lib/JWebmail/Model/Driver/QMailAuthuser/Extract.pm
index 5c31d58..6639ad9 100755
--- a/lib/JWebmail/Model/Driver/QMailAuthuser/Extract.pm
+++ b/lib/JWebmail/Model/Driver/QMailAuthuser/Extract.pm
@@ -115,16 +115,16 @@ sub list {
for my $msg (@msgs) {
my $msg2 = {
- subject => decode('MIME-Header', $msg->subject),
- from => _addresses($msg->from),
- to => _addresses($msg->to),
- cc => _addresses($msg->cc),
- bcc => _addresses($msg->bcc),
+ subject => decode('MIME-Header', $msg->subject),
+ from => _addresses($msg->from),
+ to => _addresses($msg->to),
+ cc => _addresses($msg->cc),
+ bcc => _addresses($msg->bcc),
date_received => _iso8601_utc($msg->timestamp),
- size => $msg->size,
- content_type => ''. $msg->contentType,
- mid => $msg->messageId,
- new => $msg->label('seen'),
+ size => $msg->size,
+ content_type => ''. $msg->contentType,
+ mid => $msg->messageId,
+ new => $msg->label('seen'),
};
push @msgs2, $msg2;
}
@@ -169,15 +169,15 @@ sub read_mail {
my $msg = $folder->find($mid);
return {error => 'no such message', mid => $mid} unless $msg;
return {
- subject => decode('MIME-Header', $msg->subject),
- from => _addresses($msg->from),
- to => _addresses($msg->to),
- cc => _addresses($msg->cc),
- bcc => _addresses($msg->bcc),
+ subject => decode('MIME-Header', $msg->subject),
+ from => _addresses($msg->from),
+ to => _addresses($msg->to),
+ cc => _addresses($msg->cc),
+ bcc => _addresses($msg->bcc),
date_received => _iso8601_utc($msg->timestamp),
- size => $msg->size,
- content_type => ''. $msg->contentType,
- body => do {
+ size => $msg->size,
+ content_type => ''. $msg->contentType,
+ body => do {
if ($msg->isMultipart) {
[map {{type => ''. $_->contentType, val => '' . $_->decoded}} $msg->body->parts]
}
@@ -206,15 +206,15 @@ sub search {
my @msgs2;
for my $msg (@msgs) {
my $msg2 = {
- subject => decode('MIME-Header', $msg->subject),
- from => _addresses($msg->from),
- to => _addresses($msg->to),
- cc => _addresses($msg->cc),
- bcc => _addresses($msg->bcc),
+ subject => decode('MIME-Header', $msg->subject),
+ from => _addresses($msg->from),
+ to => _addresses($msg->to),
+ cc => _addresses($msg->cc),
+ bcc => _addresses($msg->bcc),
date_received => _iso8601_utc($msg->timestamp),
- size => $msg->size,
- content_type => ''. $msg->contentType,
- mid => $msg->messageId,
+ size => $msg->size,
+ content_type => ''. $msg->contentType,
+ mid => $msg->messageId,
};
push @msgs2, $msg2;
}
diff --git a/t/Webmail.t b/t/Webmail.t
index 21f0c19..06efd49 100644
--- a/t/Webmail.t
+++ b/t/Webmail.t
@@ -15,7 +15,7 @@ my $pw = JWebmail::Model::Driver::MockJSON::VALID_PW;
my $t = Test::Mojo->new('JWebmail', {
development => { use_read_mock => 'json', block_writes => 1 },
- i18n => { default_language => 'en' },
+ i18n => { default_language => DEFAULT_LANGUAGE },
});
$t->get_ok('/')->status_is(200);