Sisima...:Status(3pm)
π Sisima...:Status(3pm) π
okay bestie, so this is a page from the User Contributed Perl Documentation section of the manual β yeah, 3pm, that's the Perl module pages, iykyk. pulling up a chair for you π«Ά
β¨ NAME β¨
Sisimai::SMTP::Status β SMTP Enhanced Status Codes related utilities. that's it, that's the whole vibe. it's the little toolbox that handles DSN codes for you π
β¨ SYNOPSIS β¨
okay so this is what it looks like when you actually use it, no cap:
use Sisimai::SMTP::Status;
print Sisimai::SMTP::Status->code('userunknown'); # '5.9.213'
print Sisimai::SMTP::Status->name('5.1.2'); # 'hostunknown'
print Sisimai::SMTP::Status->find('550 5.1.1 Unknown user');# '5.1.1'
likeβ¦ it just works, and honestly? iconic. πΈ
β¨ DESCRIPTION β¨
Sisimai::SMTP::Status is a utility class, and its whole main-character arc is three things:
- getting the DSN value from the error reason text
- getting the reason from the DSN value
- getting the DSN from the text that includes a DSN
that's the job, periodt. π
β¨ CLASS METHODS β¨
π code(reason,temp)
the code() method hands you back a pseudo DSN value from the reason string you gave it. the second argument is a flag β set it if you want that pseudo DSN value to come back as a temporary error. π¦
print Sisimai::SMTP::Status->code('mailboxfull'); # '5.9.220'
print Sisimai::SMTP::Status->code('mailboxfull',1); # '4.9.220'
π name(D.S.N.)
name() method goes the other direction bestie β you feed it a DSN value, it gives you back the reason string. reverse uno card fr fr. π
print Sisimai::SMTP::Status->name('5.1.6'); # 'hasmoved'
print Sisimai::SMTP::Status->name('4.2.3'); # 'emailtoolarge'
π test(D.S.N.)
test() method does a vibe check: is this status code a valid code or not? that's the whole assignment. β
print Sisimai::SMTP::Status->test('5.1.6'); # 1
print Sisimai::SMTP::Status->test('3.14'); # 0
π find(String, String)
find() method returns only the DSN value, pulled out of text that has a DSN hiding in it. it's giving detective energy π
print Sisimai::SMTP::Status->find('5.0.0'); # '5.0.0'
print Sisimai::SMTP::Status->find('550 5.1.1 User unknown'); # '5.1.1'
print Sisimai::SMTP::Status->find('447 delivery expired'); # ''
(that last one? empty string. not every message is gonna give you a code, and that's okay π)
π prefer(Code in Status: field, Code in an error message, [Reply code])
prefer() method returns the preferred value selected from the arguments. it picks the winner for you so you don't have to π
print Sisimai::SMTP::Status->prefer("5.2.1", "5.0.0"); # "5.2.1"
print Sisimai::SMTP::Status->prefer("4.4.7", "5.1.1", 421); # "4.4.7"
π is_explicit(delivery status code)
is_explicit() method returns 0 if the delivery status code is empty or is an internal code. so basically, 0 = "nah, not a real explicit one", and anything else means yeah. π
print Sisimai::SMTP::Status->is_explicit("5.9.301"); # 0
print Sisimai::SMTP::Status->is_explicit("5.7.625"); # 1
π is_ambiguous(delivery status code)
is_ambiguous() method returns 1 if the delivery status code is not empty and ends with ".0.0". ngl the name is doing a lot of work here, so read the examples carefully bestie π
print Sisimai::SMTP::Status->is_ambiguous("5.0.0"); # 1
print Sisimai::SMTP::Status->is_ambiguous(""); # 1
print Sisimai::SMTP::Status->is_ambiguous("4.7.7"); # 0
heads up: empty string gives you 1 too. that's the actual behaviour, not a typo, don't come for me π
β¨ AUTHOR β¨
azumakuniyuki β the one who built all this. legend behaviour, honestly. π
β¨ COPYRIGHT β¨
Copyright (C) 2015-2018,2020-2026 azumakuniyuki, All rights reserved.
β¨ LICENSE β¨
This software is distributed under The BSD 2-Clause License.
and that's the whole page, bestie π this was perl v5.40.1, dated 2026-07-05, straight from the Sisima...:Status(3pm) page β go forth and parse those status codes, you've got this π¦β¨ππ
π¦ 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