Hi,
Without seeing your code it's hard to comment, but something to keep in mind since you say the script did work, but then began seeming to be delayed:
Over the past 2 weeks many host providers, mail servers and even whole data centers (server warehouses) have been flooded by the recent virus/worm attacks, causing their mail systems to become much slower and in some cases to go offline completely for periods.
This may or may not have something to do with your sudden delays in the mail scrit, but like I said, without posting your code it'll be hard for anyone to really offer valid suggestions.
Scott