MIME-Lite-Generator

 view release on metacpan or  search on metacpan

lib/MIME/Lite/Generator.pm  view on Meta::CPAN

	}
	
	### What we should to generate
	if ($self->{state} eq 'init') {
		my $attrs = $self->{msg}{Attrs};
		my $sub_attrs = $self->{msg}{SubAttrs};
		my $rv;
		$self->{state} = 'first';
		
		### Output either the body or the parts.
		###   Notice that we key off of the content-type!  We expect fewer
		###   accidents that way, since the syntax will always match the MIME type.
		my $type = $attrs->{'content-type'};
		if ( $type =~ m{^multipart/}i ) {
			$self->{boundary} = $sub_attrs->{'content-type'}{'boundary'};

			### Preamble:
			$rv = \($self->{msg}->header_as_string . "\n" . (
					defined( $self->{msg}{Preamble} )
					  ? $self->{msg}{Preamble}
					  : "This is a multi-part message in MIME format.\n"
					) .
					 "\n--$self->{boundary}\n");

			### Parts:



( run in 3.470 seconds using v1.01-cache-2.11-cpan-524268b4103 )