Send asynchronous email with phpmailer

前端 未结 2 540
深忆病人
深忆病人 2021-01-12 02:43

Is it possible to send asynchronous emails with phpmailer?

Regular mail sending code snippet is as follows:

$mail->Send();

PHP waits

2条回答
  •  我在风中等你
    2021-01-12 03:21

    If you're on linux, you can put your php script in an exec command and launch it in background (put an & at the end of the command) and silent mode (2>&1 >/dev/null)

提交回复
热议问题