Sisimai::RFC5322(3pm)
π Sisimai::RFC5322 β the email-address bestie π
okay so this is the manual page for Sisimai::RFC5322(3pm), living under the User Contributed Perl Documentation umbrella, and honestly? she's a little utility queen. β¨
πΈ NAME πΈ
Sisimai::RFC5322 β Email address related utilities
like. that's the whole vibe. email address related utilities. she does the thing. π
π¦ SYNOPSIS π¦
use Sisimai::RFC5322;
that's it bestie, that's the entry point π«Ά
β¨ DESCRIPTION β¨
Sisimai::RFC5322 provide methods for checking an email address. π
no cap, that's what she's here for. checking an email address. iconic behavior, honestly.
π CLASS METHODS π
π received(String)
received() method returns an array reference including elements in the Received: header. π
like, you hand her a Received: header and she hands you back an array ref with all the little pieces pulled out of it. slay.
my $v = 'from mx.example.org (c1.example.org [192.0.2.1]) by neko.libsisimai.org
with ESMTP id neko20180202nyaan for <michitsuna@nyaan.jp>; ...';
my $r = Sisimai::RFC5322->received($v);
warn Dumper $r;
$VAR1 = [
'mx.example.org',
'neko.libsisimai.org',
'',
'ESMTP',
'neko20180202nyaan',
'michitsuna@nyaan.jp'
];
see how she just. parses it. the host, the receiving host, an empty string just chilling in slot three ('', she's valid, leave her alone), the protocol, the id, and the address. chef's kiss ππ
π§ part(String, Array)
part() method returns an array reference which include error message lines of given message body and the original message part splitted by the 2nd argument. πΈ
translation: you give her a message body (as a string ref) and a list of strings to split on, and she gives you back an array ref holding the error message lines plus the original message part, all split up by that second argument. two jobs, one method, main character energy fr fr.
my $v = 'Error message here
Content-Type: message/rfc822
Return-Path: <neko@libsisimai.org>';
my $r = Sisimai::RFC5322->part(\$v, ['Content-Type: message/rfc822']);
warn Dumper $r;
$VAR1 = [
'Error message here',
'Return-Path: <neko@libsisimai.org>';
];
so the 'Content-Type: message/rfc822' line got used as the split point and did NOT make it into the output, but the error message and the Return-Path: line did. the way that works. π
β¨
π AUTHOR π
azumakuniyuki
π COPYRIGHT π
Copyright (C) 2014-2025 azumakuniyuki, All rights reserved.
π LICENSE π
This software is distributed under The BSD 2-Clause License.
π yes bestie, it's the BSD 2-Clause License, go read it before you do anything wild with this code, iykyk.
and that's the whole page !! π¦ this was Sisimai::RFC5322(3pm) as documented for perl v5.40.1, dated 2026-07-05, under User Contributed Perl Documentation. thank you for coming to my ted talk, mwah ππβ¨
π¦ where this page comes from
- ubuntu stonking: libsisimai-perl 5.7.0-1 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms