Sisima...:Reply(3pm)
π Sisimai::SMTP::Reply β the perl doc for you, bestie π
okay so this is a page from the User Contributed Perl Documentation, manual section 3pm, and it's all about a lil class called Sisimai::SMTP::Reply. no cap, it's a whole vibe.
β¨ NAME β¨
Sisimai::SMTP::Reply β the SMTP reply code related class π
πΈ SYNOPSIS πΈ
like, here's how you actually use it:
use Sisimai::SMTP::Reply;
print Sisimai::SMTP::Reply->find('550 5.1.1 Unknown user'); # 550
that's it. that's the whole first-date energy. π
π¦ DESCRIPTION π¦
so "Sisimai::SMTP::Reply" is a utility class β a lil helper bestie β whose entire job is getting the SMTP reply code value out of whatever error message text you hand it. you give it the messy text, it gives you the digits. iconic. periodt. π
π CLASS METHODS π
π test(D.S.N.)
the test() method checks whether the reply code is a valid code or not. vibe check on the digits, fr fr.
print Sisimai::SMTP::Reply->test('521'); # 1
print Sisimai::SMTP::Reply->test('386'); # 0
print Sisimai::SMTP::Reply->test('101'); # 0
print Sisimai::SMTP::Reply->test('640'); # 0
so 521 said yes queen (1) and 386, 101, 640 all got left on read (0). π
π₯ find(String)
the find() method returns the SMTP reply code value. it goes digging through your string and pulls the code out. main character detective energy. π΅οΈβοΈ
print Sisimai::SMTP::Reply->find('5.0.0'); # ''
print Sisimai::SMTP::Reply->find('550 5.1.1 User unknown'); # 550
print Sisimai::SMTP::Reply->find('421 Delivery Expired'); # 421
and notice: 5.0.0 gave back an empty string '' β no code in there, bestie, it's giving nothing. π
π associatedwith(String)
the associatedwith() method returns a list related to the SMTP reply code in the argument. it's the "who's this code running with" method, iykyk. π«Ά
print Sisimai::SMTP::Reply->associatedwith("556"); # ["RCPT", "", "notaccept"]
print Sisimai::SMTP::Reply->associatedwith("421"); # []
556 came with its whole entourage ["RCPT", "", "notaccept"], and 421 rolled in solo with an empty list []. we love a minimalist. β¨
π AUTHOR π
azumakuniyuki
π COPYRIGHT π
Copyright (C) 2015-2016,2018,2020,2021,2023-2025 azumakuniyuki, All rights reserved.
π LICENSE π
This software is distributed under The BSD 2-Clause License.
and that's the whole page, bestie!! β¨ this doc was served up by perl v5.40.1 on 2026-07-05, from the Sisima...:Reply(3pm) page. go forth and parse those SMTP codes, you absolute star. π
πΈπ
π¦ 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