Solved

CDO for text message from classic asp

Posted on 2011-03-14
3
385 Views
Last Modified: 2012-06-27
I am getting a "SendUsing" error message on this.  I am trying to send a text message from a classic asp page.  Any help?  Is a different port used for sending text messages?

	Set cdoConfig = CreateObject("CDO.Configuration")
	With cdoConfig.Fields
		.Item(cdoSendUsingMethod) = cdoSendUsingPort
		.Item(cdoSMTPServer) = "mail.bhi.com"
		.Item(cdoSMTPAuthenticate) = 1
		.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
		.Item(cdoSendUsername) = "UserName"
		.Item(cdoSendPassword) = "Password"
		.Update
	End With
	
	Set cdoMessage = Server.CreateObject("CDO.Message")
	With cdoMessage
		.From = sMyNumber
		.To = sTheirNumber & GetSendURL(TheirlProvider)
		.TextBody = sMsg
		.Send
	End With
	Set cdoMessage = Nothing

Open in new window

0
Comment
Question by:Bob Schneider
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 15

Accepted Solution

by:
pateljitu earned 350 total points
ID: 35132313
In your code you would need to set CONFIG settings for object CDO.MESSAGE

Set cdoMessage = Server.CreateObject("CDO.Message")
      With cdoMessage

                Set .Configuration = cdoConfig

            .From = sMyNumber
            .To = sTheirNumber & GetSendURL(TheirlProvider)
            .TextBody = sMsg
            .Send
      End With


0
 
LVL 11

Assisted Solution

by:G_H
G_H earned 150 total points
ID: 35133240
Try this:
Set objEMail = Server.CreateObject("CDO.Message")
	objEMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")             = 2
	objEMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")            = "mail.bhi.com"
	objEMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")        = 25
	objEMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10
	objEMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate")      = 1
	objEMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername")          = "UserName"
	objEMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword")          = "Password"
	objEMail.Configuration.Fields.Update
	
	objEMail.From = sMyNumber
	objEMail.Subject = eSubject
	objEMail.HTMLBody = CStr("" & sMsg)
	objEMail.TextBody = CStr("" & sMsg)
	objEMail.To = sTheirNumber & GetSendURL(TheirlProvider)
	objEMail.Send
	next
Set objEMail = nothing

Open in new window

GH
0
 

Author Closing Comment

by:Bob Schneider
ID: 35134568
Exactly what I needed!  Thank you....
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Time Conversions...both ways 2 29
ASP Error Handler 5 35
SQL Query Returns Records in SSMS but not Classic ASP 5 47
ms sql and asp dates 5 42
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question