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 (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