Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Databases
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 25th, 2004, 10:02 AM
Authorized User
 
Join Date: Jun 2004
Location: miami, fl, USA.
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
Default Sending e-mail to different mail box!


I would like to know if this can be achieved! On the form I a drop down menu that's called ("Escalation_type") the values are eta, hdtv, and supervisors. I have some ideas but I am not sure if it will work or not. If the use chooses an eta as a value I would like it to be sent a mailbox for exam: no@where.com. If they choose hdtv as value I would like it to be sent to a different mailbox. Can this be achieve by using the case statement or the if statement?

Thank you



Reply With Quote
  #2 (permalink)  
Old August 25th, 2004, 09:44 PM
Friend of Wrox
 
Join Date: Sep 2003
Location: Mentiri, Muara, Brunei.
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hello,

  Yes, it is possible. But you have to have a condition to check the value selected. If so, you are not sure how many values may be there in the drop down box. If it is limited then OK.


set sndMail=server.createObject("CDONTS.NewMail")
If request("selEsc")="eta" then
  sndMail.To="no@where.com"
elseif request("selEsc")="hdtv" then
  sndMail.To="other@domain.com"
end if




Reply With Quote
  #3 (permalink)  
Old August 26th, 2004, 10:31 AM
Authorized User
 
Join Date: Jun 2004
Location: miami, fl, USA.
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am getting the following error when an email is sent.

CDO.Message.1 error '8004020c'

At least one recipient is required, but none were found.

/forms/Confirmation.asp, line 88

Line 88 is objCdoSys.Send()


Dim objCdoSys, cdoConf, cdoFlds


If request.form("Escalation_Type")="Eta" then


objCdoSys.To = "no@where.com"

elseif request.form("Escalation_Type")="HDTV" then


objCdoSys.To = "no@where.com"


elseif request.form("Escalation_Type")="Supervisor" then

objCdoSys.To = "no@where.com"


end if


Set objCdoSys = Server.CreateObject("CDO.Message")
Set cdoConf = Server.CreateObject("CDO.Configuration")
set cdoFlds = cdoConf.Fields
With cdoFlds
.Item("http://schemas.microsoft.com/cdo/co...ation/sendusing") = 2 '1 is default and means server on local machine, 2 means remote server
.Item("http://schemas.microsoft.com/cdo/co...tion/smtpserver") ="my.domain.com" 'here is the remote server we want to send through
.Update
End With

Set objCdoSys.Configuration = cdoConf
objCdoSys.From ="no@where.com"
'objCdoSys.To = "no@where.com"

objCdoSys.Subject = "A form was just sent to you!"
objCdoSys.TextBody = "Please click here: no@where.com "
objCdoSys.Fields("urn:schemas:httpmail:importance" ).Value = 1
objCdoSys.Fields.Update()
objCdoSys.Send()

Set objCdoSys = Nothing


Reply With Quote
  #4 (permalink)  
Old August 26th, 2004, 09:16 PM
Friend of Wrox
 
Join Date: Sep 2003
Location: Mentiri, Muara, Brunei.
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

hi,

  Response.write objCdoSys.To

and see whether any email ID is assigned or not.



Reply With Quote
  #5 (permalink)  
Old September 3rd, 2004, 06:48 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Calibus,

What is there on line number 88? Looks like TO is not specified at all, which means none of the Escalation_Type conditions were satisfied.

Check that out.

_________________________
- Vijay G
Strive for Perfection
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
problems sending mail with java mail gandacuboy J2EE 2 December 20th, 2006 03:05 PM
sending mail hastikeyvan ASP.NET 2.0 Basics 0 June 10th, 2006 09:17 AM
sending mail anita VB How-To 3 September 30th, 2004 04:48 PM
sending an e-mail Calibus Classic ASP Databases 3 August 22nd, 2004 08:45 PM
Sending both text mail and HTML mail - CDONTS madhukp Classic ASP Basics 1 October 8th, 2003 02:05 AM



All times are GMT -4. The time now is 01:18 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.