Skip to content

Commit

Permalink
No indirect notation
Browse files Browse the repository at this point in the history
  • Loading branch information
maros committed Sep 17, 2014
1 parent 3873608 commit 364405e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions lib/Mail/Builder.pm
Original file line number Diff line number Diff line change
Expand Up @@ -349,15 +349,15 @@ sub _build_text {
&& $self->has_plaintext) {

# Build multipart/alternative envelope for HTML and plaintext
$mime_part = build MIME::Entity(
$mime_part = MIME::Entity->build(
%mime_params,
Type => q[multipart/alternative],
Boundary => $self->_get_boundary(),
Encoding => 'binary',
);

# Add the plaintext entity first
$mime_part->add_part(build MIME::Entity (
$mime_part->add_part(MIME::Entity->build(
Top => 0,
Type => qq[text/plain; charset="utf-8"],
Data => $self->plaintext,
Expand All @@ -368,7 +368,7 @@ sub _build_text {
$mime_part->add_part($self->_build_html(Top => 0));
# We only have plaintext
} else {
$mime_part = build MIME::Entity (
$mime_part = MIME::Entity->build(
%mime_params,
Type => qq[text/plain; charset="utf-8"],
Data => $self->plaintext,
Expand All @@ -387,14 +387,14 @@ sub _build_html {
# We have inline images
if ($self->image->length) {
# So we need a multipart/related envelope first
$mime_part = build MIME::Entity(
$mime_part = MIME::Entity->build(
%mime_params,
Type => q[multipart/related],
Boundary => $self->_get_boundary(),
Encoding => 'binary',
);
# Add the html body
$mime_part->add_part(build MIME::Entity (
$mime_part->add_part(MIME::Entity->build(
Top => 0,
Type => qq[text/html; charset="utf-8"],
Data => $self->htmltext,
Expand All @@ -406,7 +406,7 @@ sub _build_html {
}
# We don't have any inline images
} else {
$mime_part = build MIME::Entity (
$mime_part = MIME::Entity->build(
%mime_params,
Type => qq[text/html; charset="utf-8"],
Data => $self->htmltext,
Expand Down Expand Up @@ -486,7 +486,7 @@ sub build_message {

# ... with attachments
if ($self->attachment->length()) {
$mime_entity = build MIME::Entity(
$mime_entity = MIME::Entity->build(
%email_header,
Type => 'multipart/mixed',
Boundary => $self->_get_boundary(),
Expand Down
2 changes: 1 addition & 1 deletion lib/Mail/Builder/Attachment.pm
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ sub serialize {
$value = $$file;
}

my $entity = build MIME::Entity(
my $entity = MIME::Entity->build(
Disposition => 'attachment',
Type => $self->mimetype,
Top => 0,
Expand Down
2 changes: 1 addition & 1 deletion lib/Mail/Builder/Image.pm
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ sub serialize {
$value = $file;
}

my $entity = build MIME::Entity(
my $entity = MIME::Entity->build(
Disposition => 'inline',
Type => $self->mimetype,
Top => 0,
Expand Down

0 comments on commit 364405e

Please sign in to comment.