NAME

Mail::Make::Headers::ContentTransferEncoding - Typed Content-Transfer-Encoding Header for Mail::Make

SYNOPSIS

use Mail::Make::Headers::ContentTransferEncoding;

my $cte = Mail::Make::Headers::ContentTransferEncoding->new( 'quoted-printable' ) ||
    die( Mail::Make::Headers::ContentTransferEncoding->error );
print $cte->as_string;
# quoted-printable

VERSION

v0.2.0

DESCRIPTION

A typed, validating object for the Content-Transfer-Encoding header field.

Accepts only the RFC 2045-defined encoding tokens: 7bit, 8bit, binary, base64, and quoted-printable.

CONSTRUCTOR

new( $encoding )

Creates a new object with the given encoding token. Returns an error if the token is not one of the RFC 2045-defined values.

METHODS

as_string

Returns the encoding token string.

encoding( [$value] )

Gets or sets the encoding token. Validates against allowed values.

is_binary

Returns true if the encoding is binary.

is_encoded

Returns true if the encoding is base64 or quoted-printable.

value

Alias for as_string.

AUTHOR

Jacques Deguest <jack@deguest.jp>

SEE ALSO

RFC 2045 section 6

Mail::Make::Headers::ContentType, Mail::Make::Headers, Mail::Make

COPYRIGHT & LICENSE

Copyright(c) 2026 DEGUEST Pte. Ltd.

All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.