It could be one of two things.. your code might have a problem or the X10 mail server is having a bad day. This does happen on occasion, mail sent using the 'mail() command can take several hours to arrive on occasion but this is thankfully rare.
As a workaround you might wish to consider using...