CDONTS issue (SMS)

J

James

I'm setting up an ASP page that will take a cell phone number/carrier and
e-mail some info as a text message to a client's cell phone. I have the
e-mail addresses for the major cell phone carriers. The problem is, it
seems that certain carriers interpret the HTML BR tag differently. If I use
BR, it shows up "properly" on a Cingular phone, but doesn't break at all on
a Verizon phone. Is there a way I can handle this within CDONTS or is there
some other method I can use? Would vbCrLf work?

Any help would be great,
James
 
K

Kyle Peterson

I send text mail messages via email all the time.
I have been using CDODYS with no trouble.
http://www.powerasp.com/content/new/sending_email_cdosys.asp

trick is send the email as a plain text email... dont send it as html and do
not use html tags
use real line breaks for spaces when you build the email body...

then it will look great on anyones phone

also remeber there is a 110 char limit on the body of cell phone text
messages (or something like that)
 
K

Kyle Peterson

and vbCrLf does work fine for the line breaks.. that is what I have been
using
 
J

James

Is there a standard maximum size? I believe for Verizon it's 160
characters. Not sure about other providers. I'll definitely need to cap it
somehow, just not sure what standard to use.
 
J

James

Set smsMail = Server.CreateObject("CDONTS.NewMail")
smsMail.Subject = "New Order"
smsMail.From = "(e-mail address removed)"
smsMail.To = "(e-mail address removed)"

smsBody = smsBody & fileRS("ClientCode") & vbCrLf
smsBody = smsBody & fileRS("FormType")

This still isn't giving me line breaks on a Verizon Wireless phone. Any
thoughts?
 
K

Kyle Peterson

looks I was using vbCr actually
try that and if that does not work try two in row for troubleshooting sake

here is some of my code

' Here we create a body for the version going to the cell phone
strBody2 = strBody2 & "From " & ContactUs_Name & ":" & vbCr
strBody2 = strBody2 & ContactUs_Body



' send message to cell phone as well
Set ObjSendMail = CreateObject("CDO.Message")

ObjSendMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Send the
message using the network (SMTP over the network).
ObjSendMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = smtpserver
ObjSendMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
ObjSendMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False 'Use
SSL for the connection (True or False)
ObjSendMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") =
60

ObjSendMail.Configuration.Fields.Update

ObjSendMail.To = "(e-mail address removed)"

ObjSendMail.Subject = "WebSite: " & ContactUs_Subject
ObjSendMail.From = ContactUs_Email

ObjSendMail.TextBody = strBody2
ObjSendMail.Send
Set ObjSendMail = Nothing
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top