Confirmation email delay - php form

I have managed to set up a php form on my site and everything work well except that sometimes the confirmation email to form user is delayed, some for up to a couple of hours or so.

What can I do to improve this? I’ve read about email headers but don’t know if that’s the solution?

Can anyone help?

Thanks in advance