---
name: "Sisimai::SMTP::Command"
section: "3pm"
platform: "linux"
package: "libsisimai-perl"
version: "5.3.0-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Sisimai::SMTP::Command"
---

# Sisimai::SMTP::Command(3pm)

SMTP Command related utilities

## NAME

Sisimai::SMTP::Command - SMTP Command related utilities

## SYNOPSIS

```
    use Sisimai::SMTP::Command;
    Sisimai::SMTP::Command->find('in reply to RCPT TO command');  # RCPT
```

## DESCRIPTION

`"Sisimai::SMTP::Command"` is a class for finding the last SMTP command from given error message.

## CLASS METHODS

### "test(String)"

`test()` method checks whether the SMTP command is a valid command or not

```
    print Sisimai::SMTP::Command->test('STARTTLS'); # 1
    print Sisimai::SMTP::Command->test('NEKO');     # 0
```

### "find(String)"

`find()` method returns the last SMTP command like the following:

```
    print Sisimai::SMTP::Command->find('MAIL FROM: <> 250 OK RCPT TO: <...> 550');  # "RCPT"
```

## AUTHOR

azumakuniyuki

## COPYRIGHT

Copyright (C) 2022-2024 azumakuniyuki, All rights reserved.

## LICENSE

This software is distributed under The BSD 2-Clause License.
