I would expect that “communication between CL/QSH and PHP” is not where time is lost. IMO, the more likely problem is the simple creation and destruction of the Qshell environment every time the QSH command is run. That implies creation/destruction of any environments or processes that would be initiated within Qshell.
Since a 5-8 second delay for a simple, single interactive e-mail wouldn’t be too terrible, this would seem to be more of an issue for repetitive processing, perhaps by a batch job or by an interactive invocation a a batch-style processing of a list. If that’s the case, then it seems very inappropriate to issue a QSH command for each individual e-mail. Far better would be to issue QSH only once and have the list processed within the Qshell script itself.
Even better might probably be to use a native e-mail function, e.g., the QtmmSendMail API, or a freeware utility such as MMAIL from EASY400.