Welcome Guest, Not a member yet? Register   Sign In
Extend MY_Email for Queueing Email in DB first
#1

[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
  }
#2

[eluser]sophistry[/eluser]
this sounds great. any progress you want to share with us? i am working on related email themes, but haven't gotten into db queueing and rejection/bounce handling.
#3

[eluser]bd3521[/eluser]
I currently used the post below (see link) for newsletters and just decided to use php mail and a localhost sendmail server for now.

Mail Queue




Theme © iAndrew 2016 - Forum software by © MyBB