Mail::M...g::Mail(3)

✨ NAME ✨

Mail::MIMEDefang::Mail β€” literally the mail + SMTP method collection for your email filters πŸ’Œ (this is the page for Mail::M...g::Mail(3), bestie, yes the name got truncated by the terminal, we don't talk about it)


πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so Mail::MIMEDefang::Mail is a whole lil' squad of methods you can call straight from mimedefang-filter β€” one for sending email messages, one for running SMTP checks. That's the gig. That's the whole vibe. Icons only.


πŸ’… METHODS πŸ’…

πŸŽ€ resend_message_one_recipient

Re-sends the message as if it came from the original sender, but to a single recipient. One. Just the one. No cap.

πŸŽ€ resend_message_specifying_mode

Re-sends the message as if it came from the original sender, to a list of recipients. Yeah, you pick the mode, the mode does not pick you ✨

πŸŽ€ resend_message

Re-sends the message as if it came from the original sender, to a list of recipients. Same energy, different name, we love options 🫢

πŸŽ€ pretty_print_mail

Makes a pretty-printed version of the e-mail body that is no longer than size characters. Glow-up, but make it length-limited. πŸ’–

πŸŽ€ get_smtp_return_code

Reads the return codes from the SMTP server. Returns a four-element list:

(retval, code, dsn, text)

where code is a 3-digit SMTP code. And retval is one of 'CONTINUE', 'TEMPFAIL' or 'REJECT'. That's it, that's the tea πŸ“

πŸŽ€ get_smtp_extensions

Checks the SMTP server's supported extensions. Heads up though: it expects EHLO to have already been sent β€” that's an artifact of get_smtp_return_code, so like, don't come in cold. πŸ™ˆ

The sub returns a four-element list:

(retval, code, dsn, exts)
  • retval is 'CONTINUE', 'TEMPFAIL', or 'REJECT'.
  • code is a 3-digit SMTP code.
  • dsn is an extended SMTP status code.
  • exts is a hash of EXTNAME->EXTOPTS.

Periodt. πŸ‘‘

πŸŽ€ md_check_against_smtp_server

Verifies a recipient against another SMTP server by issuing a HELO / MAIL FROM: / RCPT TO: / QUIT sequence. A whole little conversation, fr fr.

The method accepts the following parameters:

  • sender e-mail address
  • recipient e-mail address
  • helo string to put in "HELO" command
  • SMTP server to try.
  • optional: Port to connect on (defaults to 25)

And the method returns:

  • ('CONTINUE', "OK") if recipient is OK βœ…
  • ('TEMPFAIL', "err") if temporary failure 😭
  • ('REJECT', "err") if recipient is not OK πŸ’€

πŸ’‘ gentle reminder: the helo string goes in the "HELO" command exactly, and that port? defaults to 25 if you don't say otherwise. You got this, babe.

That's the whole page, bestie!! This was Mail::M...g::Mail(3) from the Mail::MIMEDefang::Mail Documentation, version 3.7.1, dated 2026-07-20 β€” slay, go filter some mail πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ«Ά

πŸ“¦ where this page comes from