.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old August 13th, 2003, 02:59 PM
Step Step is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 5 Step User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Cdonts

I'm having problems with CDONTS. I want people to enter my site, send me an e-mail and I want them to recieve an autoresponse (in their mailbox). Something like "We will contact you as soon as possible... etc...", with some news or latest promotions, etc. I use Flash with ASP. I am not a programmer, but a web designer, so I don't know a lot about programming or ASP.

The mail form and one part of the code is inside Flash, and it is my ASP above. So far users can get my page and send me a mail. And I recieve it. The problem is I can't figure out what should I do so they can receive an autoresponse, some .txt or .html file. Thank you very much.

<%@Language=VBScript%>
<%Option Explicit%>
<%Response.Buffer = True%>

<%
Dim Mailer
Dim msgTxt

msgTxt = Request("name") & vbCrLf
msgTxt = msgTxt & "le ha enviado el siguiente mensaje:" & vbCrLf & vbCrLf
msgTxt = msgTxt & Request("message")

'CDONTS Mail setup
Set Mailer = Server.CreateObject("CDONTS.Newmail")
Mailer.Send Request("email"), Request("recipient"), Request("subject"), msgTxt
Set Mailer = nothing


Response.Write "mailSent=true"
%>

Reply With Quote
  #2  
Old August 14th, 2003, 02:35 PM
Tim_Lensen Tim_Lensen is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Netherlands
Posts: 6 Tim_Lensen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I don't fully understand what you are trying to achieve. If you want to send an email to yourself with a message the user typed and you want to give a message back at the press of a button. Then you should try this.
Code:

' Send the response mail
Dim mailer AS Object
Dim HTML AS String

HTML = HTML & "<html>"
HTML = HTML & "<head>"
HTML = HTML & "<meta http-equiv=Content-Type"
HTML = HTML & "content=text/html; charset=iso-8859-1>"
HTML = HTML & "<title></title>"
HTML = HTML & "</head>"
HTML = HTML & "<body>"
' message is the name of the inputarea.
HTML = HTML & Request.Form("message")
HTML = HTML & "</body>"
HTML = HTML & "</html>"

' Send the email to yourself
Set mailer = Server.CreateObject("CDONTS.NewMail")
mailer.From = "youremail@test.com"
mailer.To = "youremail@test.com"
mailer.Importance = 2
mailer.BodyFormat = 0
mailer.Mailformat = CdoMailFormatMime
mailer.Subject = "Response via the Website"
mailer.Body = HTML
mailer.Send
Set mailer = Nothing
mailResults = result


' Send the response mail
HTML = HTML & "<html>"
HTML = HTML & "<head>"
HTML = HTML & "<meta http-equiv=Content-Type"
HTML = HTML & " content=text/html; charset=iso-8859-1>"
HTML = HTML & "<title></title>"
HTML = HTML & "</head>"
HTML = HTML & "<body>"
HTML = HTML & "We'll contact you a.s.a.p."
HTML = HTML & "</body>"
HTML = HTML & "</html>"

Set mailer = Server.CreateObject("CDONTS.NewMail")
mailer.From = "youremail@test.com"
' UserEmail being the field where the user fills out his or
' her email address
mailer.To = Request.Form("UserEmail")
mailer.Importance = 2
mailer.BodyFormat = 0
mailer.Mailformat = CdoMailFormatMime
mailer.Subject = "Subject"
mailer.Body = HTML
mailer.Send
Set mailer = Nothing
mailResults = result


I hope this is of some use.
Let me know if it works out for you.

Last edited by Tim_Lensen : August 14th, 2003 at 02:41 PM.

Reply With Quote
  #3  
Old August 14th, 2003, 02:54 PM
Step Step is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 5 Step User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thank you very very much!!!!! I'll try it. I'm sorry, I guess I didn't attach my code. And here it is.


<%@Language=VBScript%>
<%Option Explicit%>
<%Response.Buffer = True%>

<%
Dim Mailer
Dim msgTxt

msgTxt = Request("name") & vbCrLf
msgTxt = msgTxt & "le ha enviado el siguiente mensaje:" & vbCrLf & vbCrLf
msgTxt = msgTxt & Request("message")

'CDONTS Mail setup
Set Mailer = Server.CreateObject("CDONTS.Newmail")
Mailer.Send Request("email"), Request("recipient"), Request("subject"), msgTxt
Set Mailer = nothing


Response.Write "mailSent=true"
%>

Reply With Quote
  #4  
Old August 14th, 2003, 02:57 PM
Step Step is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 5 Step User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
It doesn't appear... Well, let's try again... Do you have mail?



'<%@Language=VBScript%>
'<%Option Explicit%>
'<%Response.Buffer = True%>
'
'<%
'Dim Mailer
'Dim msgTxt
'
'msgTxt = Request("name") & vbCrLf
'msgTxt = msgTxt & "le ha enviado el siguiente mensaje:" & vbCrLf & vbCrLf
'msgTxt = msgTxt & Request("message")
'
'CDONTS Mail setup
'Set Mailer = Server.CreateObject("CDONTS.Newmail")
'Mailer.Send Request("email"), Request("recipient"), Request("subject"), msgTxt
'Set Mailer = nothing
'
'
'Response.Write "mailSent=true"
'%>

Reply With Quote
  #5  
Old August 16th, 2003, 02:03 PM
Tim_Lensen Tim_Lensen is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Netherlands
Posts: 6 Tim_Lensen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Are you sure you put the code between
PHP Code:
<%%> 
. Also make sure that the from adress is valid

Last edited by Tim_Lensen : August 16th, 2003 at 02:08 PM.

Reply With Quote
  #6  
Old August 18th, 2003, 12:02 PM
Step Step is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 5 Step User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Yes, I do put <%%>, but the code doesn't appear...

<%
Dim Mailer
Dim msgTxt

msgTxt = Request("name") & vbCrLf
msgTxt = msgTxt & "le ha enviado el siguiente mensaje:" & vbCrLf & vbCrLf
msgTxt = msgTxt & Request("message")

Set Mailer = Server.CreateObject("CDONTS.Newmail")
Mailer.Send Request("email"), Request("recipient"), Request("subject"), msgTxt
Set Mailer = nothing

Response.Write "mailSent=true"
%>

Reply With Quote
Reply

Viewing: ASP Free ForumsProgramming.NET Development > Cdonts


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT