Sisima...:Error(3pm)
π NAME π
Sisimai::SMTP::Error β bestie, it's the SMTP Errors related utilities module. That's it, that's the whole vibe. π
β¨ SYNOPSIS β¨
okay so here's how you actually use it:
use Sisimai::SMTP::Error;
print Sisimai::SMTP::Error->is_permanent('SMTP error message');
print Sisimai::SMTP::Error->soft_or_hard('userunknown', 'SMTP error message');
like, that's the whole entrance exam. you're in. π«Ά
π¦ DESCRIPTION π¦
Sisimai::SMTP::Error provides a method to check an SMTP errors. no cap, that's its whole job and it does it beautifully. β¨
π CLASS METHODS π
πΈ is_permanent(String)
is_permanent() checks the given string points an permanent error or not. π
print Sisimai::SMTP::Error->is_permanent('5.1.1 User unknown'); # 1
print Sisimai::SMTP::Error->is_permanent('4.2.2 Mailbox Full'); # 0
print Sisimai::SMTP::Error->is_permanent('2.1.5 Message Sent'); # undef
so 1 means yeah permanent, 0 means nope, and undef is the little "idk bestie, not even an error" π
π§ soft_or_hard(String, String)
soft_or_hard() returns string 'soft' if given bounce reason is a soft bounce. When the reason is a hard bounce, this method returns 'hard'. If the return value is an empty string, it means that returned email may not be a bounce. π
print Sisimai::SMTP::Error->soft_or_hard('userunknown', '5.1.1 No such user'); # 'hard'
print Sisimai::SMTP::Error->soft_or_hard('mailboxfull'); # 'soft'
print Sisimai::SMTP::Error->soft_or_hard('vacation'); # ''
so it's giving vibe check for bounces β soft, hard, or honestly not even a bounce at all. periodt. π
β AUTHOR β
azumakuniyuki π
π COPYRIGHT π
Copyright (C) 2016-2018,2020-2022 azumakuniyuki, All rights reserved.
π LICENSE π
This software is distributed under The BSD 2-Clause License. slay, legally speaking. π
okay and for the lil sign-off β this whole page is coming at you courtesy of perl v5.38.2 and it was dated 2024-03-03, which is literally in the header and footer of the original, so now you know. π«Ά bye bestie, go check those SMTP errors π
π¦ where this page comes from
- ubuntu noble: libsisimai-perl 5.0.1-1 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms