1=encoding utf8 2 3=head1 NAME 4 5Mail::Message::Body::String - body of a Mail::Message stored as single string 6 7=head1 INHERITANCE 8 9 Mail::Message::Body::String 10 is a Mail::Message::Body 11 is a Mail::Reporter 12 13=head1 SYNOPSIS 14 15 See Mail::Message::Body 16 17=head1 DESCRIPTION 18 19The body (content) of a message can be stored in various ways. In this 20documentation you will find the description of extra functionality you have 21when a message is stored as a single scalar. 22 23Storing a whole message in one string is only a smart choice when the content 24is small or encoded. Even when stored as a scalar, you can still treat the 25body as if the data is stored in lines or an external file, but this will be 26slower. 27 28Extends L<"DESCRIPTION" in Mail::Message::Body|Mail::Message::Body/"DESCRIPTION">. 29 30=head1 OVERLOADED 31 32Extends L<"OVERLOADED" in Mail::Message::Body|Mail::Message::Body/"OVERLOADED">. 33 34=over 4 35 36=item overload: B<""> 37 38Inherited, see L<Mail::Message::Body/"OVERLOADED"> 39 40=item overload: B<'==' and '!='> 41 42Inherited, see L<Mail::Message::Body/"OVERLOADED"> 43 44=item overload: B<@{}> 45 46Inherited, see L<Mail::Message::Body/"OVERLOADED"> 47 48=item overload: B<bool> 49 50Inherited, see L<Mail::Message::Body/"OVERLOADED"> 51 52=back 53 54=head1 METHODS 55 56Extends L<"METHODS" in Mail::Message::Body|Mail::Message::Body/"METHODS">. 57 58=head2 Constructors 59 60Extends L<"Constructors" in Mail::Message::Body|Mail::Message::Body/"Constructors">. 61 62=over 4 63 64=item $obj-E<gt>B<clone>() 65 66Inherited, see L<Mail::Message::Body/"Constructors"> 67 68=item Mail::Message::Body::String-E<gt>B<new>(%options) 69 70 -Option --Defined in --Default 71 based_on Mail::Message::Body undef 72 charset Mail::Message::Body 'PERL' or <undef> 73 checked Mail::Message::Body <false> 74 content_id Mail::Message::Body undef 75 data Mail::Message::Body undef 76 description Mail::Message::Body undef 77 disposition Mail::Message::Body undef 78 eol Mail::Message::Body 'NATIVE' 79 file Mail::Message::Body undef 80 filename Mail::Message::Body undef 81 log Mail::Reporter 'WARNINGS' 82 message Mail::Message::Body undef 83 mime_type Mail::Message::Body 'text/plain' 84 modified Mail::Message::Body <false> 85 trace Mail::Reporter 'WARNINGS' 86 transfer_encoding Mail::Message::Body 'none' 87 88=over 2 89 90=item based_on => BODY 91 92=item charset => CHARSET|'PERL' 93 94=item checked => BOOLEAN 95 96=item content_id => STRING 97 98=item data => ARRAY-OF-LINES | STRING 99 100=item description => STRING|FIELD 101 102=item disposition => STRING|FIELD 103 104=item eol => 'CR'|'LF'|'CRLF'|'NATIVE' 105 106=item file => FILENAME|FILEHANDLE|IOHANDLE 107 108=item filename => FILENAME 109 110=item log => LEVEL 111 112=item message => MESSAGE 113 114=item mime_type => STRING|FIELD|MIME 115 116=item modified => BOOLEAN 117 118=item trace => LEVEL 119 120=item transfer_encoding => STRING|FIELD 121 122=back 123 124=back 125 126=head2 Constructing a body 127 128Extends L<"Constructing a body" in Mail::Message::Body|Mail::Message::Body/"Constructing a body">. 129 130=over 4 131 132=item $obj-E<gt>B<attach>($messages, %options) 133 134Inherited, see L<Mail::Message::Body::Construct/"Constructing a body"> 135 136=item $obj-E<gt>B<check>() 137 138Inherited, see L<Mail::Message::Body::Encode/"Constructing a body"> 139 140=item $obj-E<gt>B<concatenate>($components) 141 142Inherited, see L<Mail::Message::Body::Construct/"Constructing a body"> 143 144=item $obj-E<gt>B<decoded>(%options) 145 146Inherited, see L<Mail::Message::Body/"Constructing a body"> 147 148=item $obj-E<gt>B<encode>(%options) 149 150Inherited, see L<Mail::Message::Body::Encode/"Constructing a body"> 151 152=item $obj-E<gt>B<encoded>() 153 154Inherited, see L<Mail::Message::Body::Encode/"Constructing a body"> 155 156=item $obj-E<gt>B<eol>( ['CR'|'LF'|'CRLF'|'NATIVE'] ) 157 158Inherited, see L<Mail::Message::Body/"Constructing a body"> 159 160=item $obj-E<gt>B<foreachLine>(CODE) 161 162Inherited, see L<Mail::Message::Body::Construct/"Constructing a body"> 163 164=item $obj-E<gt>B<stripSignature>(%options) 165 166Inherited, see L<Mail::Message::Body::Construct/"Constructing a body"> 167 168=item $obj-E<gt>B<unify>($body) 169 170Inherited, see L<Mail::Message::Body::Encode/"Constructing a body"> 171 172=back 173 174=head2 The body 175 176Extends L<"The body" in Mail::Message::Body|Mail::Message::Body/"The body">. 177 178=over 4 179 180=item $obj-E<gt>B<isDelayed>() 181 182Inherited, see L<Mail::Message::Body/"The body"> 183 184=item $obj-E<gt>B<isMultipart>() 185 186Inherited, see L<Mail::Message::Body/"The body"> 187 188=item $obj-E<gt>B<isNested>() 189 190Inherited, see L<Mail::Message::Body/"The body"> 191 192=item $obj-E<gt>B<message>( [$message] ) 193 194Inherited, see L<Mail::Message::Body/"The body"> 195 196=item $obj-E<gt>B<partNumberOf>($part) 197 198Inherited, see L<Mail::Message::Body/"The body"> 199 200=back 201 202=head2 About the payload 203 204Extends L<"About the payload" in Mail::Message::Body|Mail::Message::Body/"About the payload">. 205 206=over 4 207 208=item $obj-E<gt>B<charset>() 209 210Inherited, see L<Mail::Message::Body/"About the payload"> 211 212=item $obj-E<gt>B<checked>( [BOOLEAN] ) 213 214Inherited, see L<Mail::Message::Body/"About the payload"> 215 216=item $obj-E<gt>B<contentId>( [STRING|$field] ) 217 218Inherited, see L<Mail::Message::Body/"About the payload"> 219 220=item $obj-E<gt>B<description>( [STRING|$field] ) 221 222Inherited, see L<Mail::Message::Body/"About the payload"> 223 224=item $obj-E<gt>B<disposition>( [STRING|$field] ) 225 226Inherited, see L<Mail::Message::Body/"About the payload"> 227 228=item $obj-E<gt>B<dispositionFilename>( [$directory] ) 229 230Inherited, see L<Mail::Message::Body::Encode/"About the payload"> 231 232=item $obj-E<gt>B<isBinary>() 233 234Inherited, see L<Mail::Message::Body::Encode/"About the payload"> 235 236=item $obj-E<gt>B<isText>() 237 238Inherited, see L<Mail::Message::Body::Encode/"About the payload"> 239 240=item $obj-E<gt>B<mimeType>() 241 242Inherited, see L<Mail::Message::Body/"About the payload"> 243 244=item $obj-E<gt>B<nrLines>() 245 246Inherited, see L<Mail::Message::Body/"About the payload"> 247 248=item $obj-E<gt>B<size>() 249 250Inherited, see L<Mail::Message::Body/"About the payload"> 251 252=item $obj-E<gt>B<transferEncoding>( [STRING|$field] ) 253 254Inherited, see L<Mail::Message::Body/"About the payload"> 255 256=item $obj-E<gt>B<type>( [STRING|$field] ) 257 258Inherited, see L<Mail::Message::Body/"About the payload"> 259 260=back 261 262=head2 Access to the payload 263 264Extends L<"Access to the payload" in Mail::Message::Body|Mail::Message::Body/"Access to the payload">. 265 266=over 4 267 268=item $obj-E<gt>B<endsOnNewline>() 269 270Inherited, see L<Mail::Message::Body/"Access to the payload"> 271 272=item $obj-E<gt>B<file>() 273 274Inherited, see L<Mail::Message::Body/"Access to the payload"> 275 276=item $obj-E<gt>B<lines>() 277 278Inherited, see L<Mail::Message::Body/"Access to the payload"> 279 280=item $obj-E<gt>B<print>( [$fh] ) 281 282Inherited, see L<Mail::Message::Body/"Access to the payload"> 283 284=item $obj-E<gt>B<printEscapedFrom>($fh) 285 286Inherited, see L<Mail::Message::Body/"Access to the payload"> 287 288=item $obj-E<gt>B<string>() 289 290Inherited, see L<Mail::Message::Body/"Access to the payload"> 291 292=item $obj-E<gt>B<stripTrailingNewline>() 293 294Inherited, see L<Mail::Message::Body/"Access to the payload"> 295 296=item $obj-E<gt>B<write>(%options) 297 298Inherited, see L<Mail::Message::Body/"Access to the payload"> 299 300=back 301 302=head2 Internals 303 304Extends L<"Internals" in Mail::Message::Body|Mail::Message::Body/"Internals">. 305 306=over 4 307 308=item $obj-E<gt>B<addTransferEncHandler>( $name, <$class|$object> ) 309 310=item Mail::Message::Body::String-E<gt>B<addTransferEncHandler>( $name, <$class|$object> ) 311 312Inherited, see L<Mail::Message::Body::Encode/"Internals"> 313 314=item $obj-E<gt>B<contentInfoFrom>($head) 315 316Inherited, see L<Mail::Message::Body/"Internals"> 317 318=item $obj-E<gt>B<contentInfoTo>($head) 319 320Inherited, see L<Mail::Message::Body/"Internals"> 321 322=item $obj-E<gt>B<fileLocation>( [$begin, $end] ) 323 324Inherited, see L<Mail::Message::Body/"Internals"> 325 326=item $obj-E<gt>B<getTransferEncHandler>($type) 327 328Inherited, see L<Mail::Message::Body::Encode/"Internals"> 329 330=item $obj-E<gt>B<isModified>() 331 332Inherited, see L<Mail::Message::Body/"Internals"> 333 334=item $obj-E<gt>B<load>() 335 336Inherited, see L<Mail::Message::Body/"Internals"> 337 338=item $obj-E<gt>B<modified>( [BOOLEAN] ) 339 340Inherited, see L<Mail::Message::Body/"Internals"> 341 342=item $obj-E<gt>B<moveLocation>( [$distance] ) 343 344Inherited, see L<Mail::Message::Body/"Internals"> 345 346=item $obj-E<gt>B<read>( $parser, $head, $bodytype, [$chars, [$lines]] ) 347 348Inherited, see L<Mail::Message::Body/"Internals"> 349 350=back 351 352=head2 Error handling 353 354Extends L<"Error handling" in Mail::Message::Body|Mail::Message::Body/"Error handling">. 355 356=over 4 357 358=item $obj-E<gt>B<AUTOLOAD>() 359 360Inherited, see L<Mail::Message::Body/"Error handling"> 361 362=item $obj-E<gt>B<addReport>($object) 363 364Inherited, see L<Mail::Reporter/"Error handling"> 365 366=item $obj-E<gt>B<defaultTrace>( [$level]|[$loglevel, $tracelevel]|[$level, $callback] ) 367 368=item Mail::Message::Body::String-E<gt>B<defaultTrace>( [$level]|[$loglevel, $tracelevel]|[$level, $callback] ) 369 370Inherited, see L<Mail::Reporter/"Error handling"> 371 372=item $obj-E<gt>B<errors>() 373 374Inherited, see L<Mail::Reporter/"Error handling"> 375 376=item $obj-E<gt>B<log>( [$level, [$strings]] ) 377 378=item Mail::Message::Body::String-E<gt>B<log>( [$level, [$strings]] ) 379 380Inherited, see L<Mail::Reporter/"Error handling"> 381 382=item $obj-E<gt>B<logPriority>($level) 383 384=item Mail::Message::Body::String-E<gt>B<logPriority>($level) 385 386Inherited, see L<Mail::Reporter/"Error handling"> 387 388=item $obj-E<gt>B<logSettings>() 389 390Inherited, see L<Mail::Reporter/"Error handling"> 391 392=item $obj-E<gt>B<notImplemented>() 393 394Inherited, see L<Mail::Reporter/"Error handling"> 395 396=item $obj-E<gt>B<report>( [$level] ) 397 398Inherited, see L<Mail::Reporter/"Error handling"> 399 400=item $obj-E<gt>B<reportAll>( [$level] ) 401 402Inherited, see L<Mail::Reporter/"Error handling"> 403 404=item $obj-E<gt>B<trace>( [$level] ) 405 406Inherited, see L<Mail::Reporter/"Error handling"> 407 408=item $obj-E<gt>B<warnings>() 409 410Inherited, see L<Mail::Reporter/"Error handling"> 411 412=back 413 414=head2 Cleanup 415 416Extends L<"Cleanup" in Mail::Message::Body|Mail::Message::Body/"Cleanup">. 417 418=over 4 419 420=item $obj-E<gt>B<DESTROY>() 421 422Inherited, see L<Mail::Reporter/"Cleanup"> 423 424=back 425 426=head1 DETAILS 427 428Extends L<"DETAILS" in Mail::Message::Body|Mail::Message::Body/"DETAILS">. 429 430=head1 DIAGNOSTICS 431 432=over 4 433 434=item Warning: Charset $name is not known 435 436The encoding or decoding of a message body encounters a character set which 437is not understood by Perl's Encode module. 438 439=item Warning: No decoder defined for transfer encoding $name. 440 441The data (message body) is encoded in a way which is not currently understood, 442therefore no decoding (or recoding) can take place. 443 444=item Warning: No encoder defined for transfer encoding $name. 445 446The data (message body) has been decoded, but the required encoding is 447unknown. The decoded data is returned. 448 449=item Error: Package $package does not implement $method. 450 451Fatal error: the specific package (or one of its superclasses) does not 452implement this method where it should. This message means that some other 453related classes do implement this method however the class at hand does 454not. Probably you should investigate this and probably inform the author 455of the package. 456 457=item Error: Unable to read file $filename for message body scalar: $! 458 459A L<Mail::Message::Body::String|Mail::Message::Body::String> object is to be created from a named 460file, but it is impossible to read that file to retrieve the lines within. 461 462=item Warning: Unknown line terminator $eol ignored 463 464=back 465 466=head1 SEE ALSO 467 468This module is part of Mail-Message distribution version 3.011, 469built on July 27, 2021. Website: F<http://perl.overmeer.net/CPAN/> 470 471=head1 LICENSE 472 473Copyrights 2001-2021 by [Mark Overmeer <markov@cpan.org>]. For other contributors see ChangeLog. 474 475This program is free software; you can redistribute it and/or modify it 476under the same terms as Perl itself. 477See F<http://dev.perl.org/licenses/> 478 479