PHP Mail Script Takes Hours to Send emails

guys, i have a php script that i wrote that takes hours to send emails to recipients.

i can't post the content of this script in here because the script contains some very important confidential information.

so my question is, why is it that when the php script runs, it runs successfully, but instead of receiving the emails in less than 3 minutes (being generous here), it doesn't send the emails until hours after the script completed.

what could be wrong with it?

the script sends two emails:

1 email has a file attachment that is no more than 7kb in size.
The other email is just a regular notification email to another different email address.

So you mean to say that emails are beng sent, but taking hours.
It could be problem with mail server. May be you want to check that.

the webserver is owned by godaddy. and i have no control over that. but its kind of disturbing this is happening. there has to be a way around this.

I have used godaddy mail server few times (with and without attachment) and I found that it takes max 15 mins some times. And since you don't have any control over the mail server, you may raise a ticket to godaddy and they can see what exactly is the problem.