這是--helpSwiftMailer 的發送命令選項的輸出:
$ php bin/console swiftmailer:spool:send -help
Description:
Sends emails from the spool
Usage:
swiftmailer:spool:send [options]
Options:
--message-limit=MESSAGE-LIMIT The maximum number of messages to send.
--time-limit=TIME-LIMIT The time limit for sending messages (in seconds).
--recover-timeout=RECOVER-TIMEOUT The timeout for recovering messages that have taken too long to send (in seconds).
--mailer=MAILER The mailer name.
--transport=TRANSPORT The service of the transport to use to send the messages.
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-e, --env=ENV The Environment name. [default: "prod"]
--no-debug Switches off debug mode.
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Help:
The swiftmailer:spool:send command sends all emails from the spool.
php bin/console swiftmailer:spool:send --message-limit=10 --time-limit=10 --recover-timeout=900 --mailer=default
我想以除錯級別的詳細程度運行它。但是,我得到的輸出與正常運行命令時完全相同:
$ php bin/console swiftmailer:spool:send -vvv
[2021-10-15 12:11:22] Processing default mailer spool...
2 emails sent
我希望詳細選項至少顯示有關正在發送的訊息的一些詳細資訊......有誰知道不同的詳細級別應該顯示什么樣的輸出?我是否在錯誤地使用它,如果是這樣,獲得詳細輸出的正確方法是什么?
uj5u.com熱心網友回復:
詳細級別與特定命令無關。它是symfony/console組件的一部分,只是為您(作為開發人員)提供對用戶輸入做出反應的控制元件的一種方式。
并非所有提供的命令都利用它并且并不總是對其做出反應。如果你往里面看,Symfony\Bundle\SwiftmailerBundle\Command\SendEmailCommand.php你也找不到
if($this->io->getVerbosity()) { //... }
也不
if($this->io->isVerbose()) { //... }
也不
if($this->io->isVeryVerbose()) { //... }
所以這是根本沒有邏輯-vvv的swiftmailer:spool:send
因此,一般而言,更高的詳細程度只會為您提供有關錯誤的更多資訊,例如,如果拋出任何例外,則堆疊跟蹤。...除非您在自己的命令中實施了一些檢查。
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/322528.html
標籤:php symfony 电子邮件 smtp 迅捷邮递员
