Search notes:

Perl module Email::Simple

#!/usr/bin/perl
use warnings;
use strict;

use Email::Simple;

my $rfc_2822 = <<'END_2822';
From: John Doe <jdoe@machine.example>
To: Mary Smith <mary@example.net>
Subject: Saying Hello
Date: Fri, 21 Nov 1997 09:55:06 -0600
Message-ID: <1234@local.machine.example>

This is a message just to say hello.
So, "Hello".
END_2822

my $mail = Email::Simple->new($rfc_2822);

foreach my $header_item (qw(Subject From To Date)) {
  printf "%-8s: %-30s\n", $header_item, $mail->header($header_item);
}
print "\n";
print $mail->body;
Github repository PerlModules, path: /Email/Simple/script.pl
This script, when run, prints
Subject : Saying Hello                  
From    : John Doe <jdoe@machine.example>
To      : Mary Smith <mary@example.net> 
Date    : Fri, 21 Nov 1997 09:55:06 -0600

This is a message just to say hello.
So, "Hello".

See also

Perl modules
Perl module Email::MIME
Perl module MIME::Base64, Perl module MIME::Lite
MIME

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1741108351, '18.226.82.177', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/Perl/modules/Email/Simple/index(80): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78