PDA

View Full Version : Solved: Text Messenging



stanl
01-07-2006, 07:08 AM
Realizing with most US cell providers, sending text messages costs, but receiving is free, those dimes can add-up for teenagers or for a small company with a mobile sales force. Major carriers permit sending messages either via SMTP or HTTP -



Alltel,@message.alltel.com
Cingular,@cingularme.com
Nextel,@messaging.nextel.com
Sprint,@messaging.sprintpcs.com
SunCom,@tms.suncom.com
T-mobile,@tmomail.net
VoiceStream,@voicestream.net
Verizon,@vtext.com


I have some code I am putting together for Cingular - but am unable to decide whether to launch it from Excel or Access. Then, I don't want to re-invent the wheel or create another mousetrap -

Has anyone previously worked in this area.

TIA
Stan

Ken Puls
01-07-2006, 10:47 AM
Sorry, you're looking to create and send an email to these recipients, yes? Either can be configured to work in some manner.

I'm not sure if Access has any native sendmail functions (I'm more of an Excel guy), but Excel certainly does. And if it won't work, (the native sendmail function will not work if you use Novell's Groupwise and your sysadmin configured it in a specific way, for example,) you can always bind to another application to send it.

A search of our Knowledgebase (the KBase menu item up top) should yield you multiple examples for sending via Outlook, Groupwise (if you have it), and possibly others. If you'd like to send your mail without leaving a copy in the outbox, you may also way to research sending mail via CDO. FYI, ANY of these can be done from Access just as easily as they can from Excel, since you're using another application to perform the task.

Let us know which way you'd prefer to go, or ask us any questions you need to for the decision.

Cheers!

stanl
01-07-2006, 03:29 PM
Sorry, you're looking to create and send an email to these recipients, yes?


Not exactly. If I were to use smtp, I would be tied to an app that either uses an email account, or ay minimum a UID/PW and port. If I collect the to/from/subject/message locally and use either the IE applicattion object or (hopefully) HTTP, I can more accurately monitor the responses per client.

My indecision with Access/Excel has to do with keeping data on providers and recipient numbers, then use VBA to create a userform... something like

Ken Puls
01-07-2006, 03:40 PM
Not exactly. If I were to use smtp, I would be tied to an app that either uses an email account, or ay minimum a UID/PW and port.

Not necessarily. Have a look at this thread (http://vbaexpress.com/forum/showthread.php?t=6587). It discusses using CDO to email, rather than Outlook, Outlook Express, etc... This works outside of those apps to email directly.

Let me know what you think.

I'm not trying to push you into one of these, just hopefully open options for you. I don't know about the practicality of using IE or HTTP to email, as emailing isn't in the scope of the IE object model. You'd need every client to have a webmail account which would be even worse than configuring for a specific app, I'm thinking...

Actually... I suppose you could set up one webmail account somewhere, open a hidden instance of IE, and email yourself from there. It would involve some tricky coding to get it right, though, and you'd have to hope that your webmail provider didn't change anything on you. For my money, I think I'd look at CDO first.

stanl
01-07-2006, 04:11 PM
Sorry, my bad. I posted the smtp screen rather than the IE screen. The attached example is for Cingular. It is the alternative to email.

Stan

stanl
01-07-2006, 04:13 PM
here, finally [not having a good Internet Day]

Ken Puls
01-07-2006, 04:41 PM
Hi Stan,

Okay, I gotcha now. I assume that it's a generic page that you can send a message to a cingular customer, correct? Can you provide the link?

If it doesn't use any crazy coding, the technique illustrated here (http://www.motobit.com/tips/detpg_sendfrmie/) may work. It does depend if the page just uses a standard form though and doesn't involve any crazy javascript or anything.

stanl
01-08-2006, 07:43 AM
Okay, I gotcha now. I assume that it's a generic page that you can send a message to a cingular customer, correct? Can you provide the link?


Ken, thanks for bearing with me. That would be www.cingularme.com (http://www.cingularme.com), and the other providers in the list in the first message should be a www site. An individual subscriber can be reached via SMTP by sending an email to
Subscriber # + @providersite.com

however, you have little control over errors - ie. that subscriber has the flag for incoming text messages turned off. Also, you require SMTP server settings and password which makes portability/security an issue. Using the actual web-sites requires more code, one for each provider included but you can interpret return messages and the code is portable. Ideally subscriber #'s could be associated with providers as either separate Tabs in Excel, a relational Table in Access, or an MSShape XML table. With respect to the Cingular site - they assign a jsessionid from the initial page in order to move to the submit page. This can be parsed from the oIE.Document.Body.HTMLText (it begins /do/public;) which is appended to www.cingularme.com (http://www.cingularme.com) - then you fill in the form with To From Subject Message and submit.

Right now I'm concerned with the database aspects - selecting a provider, then a subscriber, entering a message (in a user form?) and submitting.

I hope this makes a little more sense... sort of a Forest...Trees thing :)

Stan

stanl
01-08-2006, 07:51 AM
Oh.. as a P.S. - you do not have to login or register at the site to send a message, just click send a message from the initial page.

Ken Puls
01-08-2006, 06:25 PM
Right now I'm concerned with the database aspects - selecting a provider, then a subscriber, entering a message (in a user form?) and submitting.

I hope this makes a little more sense... sort of a Forest...Trees thing

Hmmm... okay. I'm not 100% sure I'm following.

I've looked at the page for Cingular. The jsession ID shouldn't be an issue. It gave me the following we I started, and I can use it in IE, Firefox, even after a new one has been entered: http://www.cingularme.com/do/public;jsessionid=aCjjz_RXb3L5?l=en-US&v=cingular

As far as the database part, you'd obviously need to maintain some kind of database to hold the Name, number & carrier, then match the carrier to the website URL. That shouldn't be too hard. Access or Excel makes no matter really, and I'd decide it based on the number of records you're going to have. I'm not sure how much data you have, but I wouldn't set it up in Excel on tabs, unless there was a really good reason. Ideally, you'd want to set it up in a worksheet, to allow you to quickly look up all the other data based on someone's name, etc...

Once you know the logic behind returning the appropriate data, populating controls in a userform is relatively easy as well. The hardest part would be perfecting the IE side, particularly if a different carrier uses different methods.

Is that at all helpful?

stanl
01-09-2006, 04:18 AM
Yes. Thanks. I've whittled down the list to these sites:
Alltel,http://message.alltel.com/customer_site/jsp/go_lo.jsp
Cingular,http://www.cingularme.com/
Nextel,http://messaging.nextel.com/cgi/iPageExt.dll?cmd=buildIndAddressPage
Sprint,http://messaging.sprintpcs.com/textmessaging/compose
SunCom,http://www.suncom.com/messaging/message.shtml
T-mobile,https://wmg.tmomail.net/customer_site/jsp/messaging_lo.jsp
Verizon,https://www.vtext.com/customer_site/jsp/messaging_lo.jsp

I'm going to see if HTTP Get/Post will work as opposed to using the Explorer Object.
Stan

Ken Puls
01-09-2006, 09:20 AM
Please keep us updated on this, Stan. I'm very curious to know how you make out with it. :)