我使用PHPMailer发送电子邮件,但处理时间太长。 我该怎么解决?

When an order is placed, the order details are sent via email to the customer and seller but it takes too long to send the email due to which the order placement takes time. What should be done to make the process faster?

I guess you should implement a Queue, for example [https://laravel.com/docs/5.2/queues]

Install a local mail server (I'd recommend postfix) and send to it from PHPMailer using SMTP. That is the fastest way of getting a message on its way. It means that your script does not have to deal with DNS lookups, remote connections, authentication, and it hands off control to the mail server that deals with all those things asynchronously, including queuing, retrying, bouncing etc.

You can implement queuing in PHP, but it's really the wrong tool for the job. Regardless of the implementation, it will be much, much slower and more error-prone than using a mail server, and more to the point, it's software that you will need to write, test and maintain.