Solved

CDO for text message from classic asp

Posted on 2011-03-14
3
386 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

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…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

635 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