[eluser]bd3521[/eluser]
Has anyone considered storing emails in a table first before simply just sending them via php mail during the same page load?
This would help deter the probability of a slow page load because of email connectivity issues and also allow you to track successfully sent messages (if not, try resending them) and track which emails were opened etc...
Then you can have a class (cronjob or potentially spawn a new php thread somehow) that monitors the email table and sends unsent emails.
Code:
class MY_Email extends CI_Email {
function MY_Email(){
parent::CI_Email();
}
function _send_with_mail()
{
// store in table $this->_recipients, $this->_subject, $this->_finalbody, $this->_header_str
}