Sisima...ailure(3pm)
π NAME π
Sisimai::SMTP::Failure β SMTP errors related utilities, aka your lil bestie for vibe-checking SMTP errors π¦
(It lives in the User Contributed Perl Documentation section, for the record, section 3pm.)
β¨ SYNOPSIS β¨
okay so here's the whole vibe, bestie β load it up, then ask it questions:
use Sisimai::SMTP::Failure;
print Sisimai::SMTP::Failure->is_temporary('421 SMTP error message');
print Sisimai::SMTP::Failure->is_permanent('550 SMTP error message');
print Sisimai::SMTP::Failure->is_softbounce('mailboxfull', 4.2.2 mailbox full');
print Sisimai::SMTP::Failure->is_hardbounce('userunknown', 5.1.1 user not found');
that's it, that's the whole personality π
πΈ DESCRIPTION πΈ
Sisimai::SMTP::Failure provide methods to check an SMTP errors. no cap, that's literally the entire job description β it hands you the little methods so you can peek at an SMTP error and be like "hmm. is that a you problem or a them problem?" π
π CLASS METHODS π
π©· is_permanent(String)
is_permanent() method checks the given string points an permanent error or not.
print Sisimai::SMTP::Failure->is_permanent('5.1.1 User unknown'); # 1
print Sisimai::SMTP::Failure->is_permanent('4.2.2 Mailbox Full'); # 0
print Sisimai::SMTP::Failure->is_permanent('2.1.5 Message Sent'); # 0
so 5.1.1 User unknown gets a 1 (slay, that's permanent fr), and the other two get a fat 0 β 4.2.2 Mailbox Full is a temporary girlypop and 2.1.5 Message Sent is just a success message being cute, so neither of them counts π
π¦ is_temporary(String)
is_temporary() method checks the given string points an temporary error or not.
print Sisimai::SMTP::Failure->is_permanent('5.1.1 User unknown'); # 0
print Sisimai::SMTP::Failure->is_permanent('4.2.2 Mailbox Full'); # 1
print Sisimai::SMTP::Failure->is_permanent('2.1.5 Message Sent'); # 0
not me noticing the example callsis_permanentin theis_temporarysection π β yes bestie, that's exactly how it's written in the docs, and we are keeping it character for character, no editing, periodt. The numbers tell the story anyway:4.2.2 Mailbox Fullis your1here, the other two are0.
π is_hardbounce(String, String)
is_hardbounce() method checks the given reason is a hard bounce or not
print Sisimai::SMTP::Failure->is_hardbounce('5.1.1 User unknown'); # 1
print Sisimai::SMTP::Failure->is_hardbounce('4.2.2 Mailbox Full'); # 0
print Sisimai::SMTP::Failure->is_hardbounce('5.7.27 DKIM failed'); # 0
so 5.1.1 User unknown is a 1 β hard bounce energy, main character of bad news π β while 4.2.2 Mailbox Full and 5.7.27 DKIM failed both come back 0 π
is_softbounce() method checks the given reason is a soft bounce or not
print Sisimai::SMTP::Failure->is_softbounce('5.1.1 User unknown'); # 0
print Sisimai::SMTP::Failure->is_softbounce('4.2.2 Mailbox Full'); # 1
print Sisimai::SMTP::Failure->is_softbounce('5.7.27 DKIM failed'); # 1
and here 5.1.1 User unknown is the 0, while 4.2.2 Mailbox Full and 5.7.27 DKIM failed both hit 1 π soft bounce besties, we stay hydrated π
π AUTHOR π
azumakuniyuki β the icon who wrote all this π«Ά
π COPYRIGHT π
Copyright (C) 2016-2018,2020-2022,2024 azumakuniyuki, All rights reserved.
β LICENSE β
This software is distributed under The BSD 2-Clause License.
and that's a wrap, bestie π β this page was served up fresh on 2026-07-05, running under perl v5.40.1, and it's filed away in Sisima...ailure(3pm). go forth and check those SMTP errors, iykyk π
β¨
π¦ 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