Jump to content

Recommended Posts

Posted

One of the pages on my site is set up to send short messages to mine & my wife's cell phones. I uses php's mail function to handle this. I set the page up becuase our cell provider's (cingular) system for sending messages is a bit flaky and unreliable. Unfortuneatley, so is my solution...

 

My problem is that when a message is sent by php's mail function, it can sometimes take hours to reach the recipient (in this case, a cell phone). I have my script set up to mail the message to the cell phone's e-mail address, and to also .cc my TCH hosted address. The .cc always arrives instantly, and most of the time, the cell phone message arrives within a minute or 2. Sometimes, the cell phone message arrives a few hours later, and sometimes not at all. I have tried setting the script up to send the message to my comcast e-mail address (still .cc'ing my TCH address), and had the same thing happen, so I can assume that it's not cingular's fault. Again, the .cc always arrives immediately, but the real message sometimes takes hours to arrive, sometimes arrives quickly, and sometimes never arrives. Does anybody have any idea why this may be happening?

 

I'm not at a PC that has the source of my script on it right now - I'll post the php code as soon as I can, in case that may help.

 

Thank you!

 

Allan

Posted

Hi,

 

Can you send it to a non tch address at the same time and see if you still have a problem. The CC should of course work as soon as you send it

 

Cheers

 

Jim

Posted

I've changed the script to send it to my ComCast e-mail address, and my work address instead of the cell phone. Both ComCast and Work have experienced the delay, however the work address has not lost a message (I've tried both at least 5 times). I have not set the script up to send to both ComCast AND cell phone (still with a .cc to TCH). I'll try that, and will post the source code as soon as I get to it (should be about 1/2 hour from now).

 

Thanks -

 

Allan

Posted

Sorry for the long delay - here is the source code...

 

($body, $from, and $subject are set earlier in the script)

if ($TO == "Allan_Phone") {

 

  $sendto = "xxxxxxxxxx@mobile.mycingular.com";

 

  $backupheaders = "From:" . $FROM . "\r\n";

 

  mail("xxxxx@doute.net", "Backup e-mail of a textpage", $body, $backupheaders) or die ("An Error was encountered sending the backup e-mail. Please go back and try again.");

 

...

 

mail($sendto, $subj, $body, $headers) or die ("An Error was encountered sending your message. Please go back and try again.");

 

I had forgotten that the message and the backup were not sent together (as to: and as .cc) as I had stated, but were sent as seperate messages. I don't remember why I changed to seperate messages, but I don't think that would explain the lag..

 

Any ideas?

 

Thanks -

 

Allan

Posted

Hi,

 

It could just be there mailserver. I know that my work server (not TCHs) is painfully slow to recieve emails if they are external.

 

This could be the case on yours

 

Jim

Posted

That's basically what I figured, but I don't like that answer :P . The only part about that answer that bothers me technically is the fact that the message sometimes is hours late or not delivered at all to whatever address I send it to. My work address VERY rarely has any delay problems, and (believe it or not), my ComCast address has always been very reliable, too.

 

Is it possible that the FROM address being a non-existing address may be posing a problem? I find that hard to believe - becuase the problem is so intermittent, but at this point I'm grasping at anything.

 

Allan

Posted

Hi,

 

but I don't like that answer

Painful life lesson I learnt, the truth always hurts!

 

Possible idea, Can you not create a dummy email account and use that as the "from" account? Set the dummy account space to be 1 meg big if you can spare it. That would at least rule that one out.

 

It really depends how comcast do there mail I suppose.

 

Jim

Posted

I'm in the process of doing just that. The only downside to that is the fact that my (and my wife's) cell phones can only accept 160 characters, and the FROM address is part of that. So, even using "x@doute.net" takes 11 characters away from the message. I'll try it out as soon as I push the code to TCH, but its been working fine today so far - no delays. It really is intermittent - seems to only delay important messages. But, it just seems so strange that the messages get delayed SOMETIMES no matter where they are going (except to TCH servers, of course).

 

And, yes, it's probably a Cingular issue, so there may well be nothing I can do about it. And that truth does kind of hurt :P .

 

I'll let you know if I notice any delays or lost messages after I change the FROM address to a valid address.

 

Thanks again for your time -

 

Allan

Posted
Is it possible that the FROM address being a non-existing address may be posing a problem?  I find that hard to believe - becuase the problem is so intermittent, but at this point I'm grasping at anything.

Using smtpsend here in a locally executed script we were unable to send e-mails from a non-existant address. Once I added a forward from the non-existant address to a real address everything worked fine. This happened twice, both times the sam solution fixed the problem.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...