Solved

CDO for text message from classic asp

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

756 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