Welcome Guest, Not a member yet? Register   Sign In
Email Class takes hours to send email
#1

[eluser]Unknown[/eluser]
Hi,

So we are using the email class to send emails such as verification emails, welcome emails, etc.

The problem is, the verification email takes too long to get received by our users- some users have reported waiting 4 hours to get it while others it took them an hour. I really don't know what could be causing this, majority of our vars are default.

Heres the emailing code;
Code:
$email = $this->User->get_email_by_hash($hash);
                $this->load->library('email');
                    
                $config['mailtype'] = 'html';
                
                $this->email->initialize($config);
                $this->email->from('[email protected]', 'Website');
                $this->email->to($email);    
                $this->email->subject('Welcome to Website');
                $this->email->message('HTML EMAIL HERE');    
    
                $this->email->send();

Could this be a host issue? We are hosted with MediaTemple.

Also we have tested it ourselves locally and it takes seconds, but when on our server sometimes it takes an hour.
#2

[eluser]Eric Barnes[/eluser]
It could be the domain, hosting, or mx records. Sometimes with shared hosting you can be on the same ip as a spammer. For DNS you can try something like: http://www.mxtoolbox.com/

I would probably contact your host though as this is outside of the framework itself.
#3

[eluser]Unknown[/eluser]
Thanks for the reply.

I am using a virtual private server so it is not shared. I have contacted my host and awaiting reply.

I used the tool you posted, everything is ok, except when i did a blacklist check;
CYBERLOGIC TIMEOUT ERROR, Reponse code=2
SPAMRBL TIMEOUT ERROR, Reponse code=2




Theme © iAndrew 2016 - Forum software by © MyBB