Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

CDO Mail Object Help
I have an E-mail ASP Web form that is using a CDO Mail
Object.  This form has to be filled out before the
customer can download our demo. Currently, the customer
fills out the form, clicks to submit and a message appears
to the customer telling them it was successful and to
click on a picture on the form to download the demo. My
problem is that many of the customer don't read the
message.  I want to modify the code so that after the
customer clicks SUBMIT, the info is submitted and then the
download immediately begins without them having to take
further action.

What is the code I should add to begin downloading a file
after the form is successfully submitted.  Here's some of
the code I am currently using:

Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Cosmetology DEMO for " &
Request ("Department")

objMessage.From = "americassoftware@alltel.net"
objMessage.To = "americassoftware@alltel.net"
objMessage.TextBody = ("txtmsg")& " " & "Name: "
&  Request("addressto")& " Dept: " & Request("Department")
& " Telephone: " & Request ("Telephone Number") & "
Email: " & Request ("Email Address") & " School Name: " &
Request ("Company/School Name") & " City/State: " &
Request ("City/State")
objMessage.Send

mailres=objMessage.Send()
if NOT mailres then
%>
<script language = "JavaScript">
<!--
alert("Your information has been sent.  Click on
the Graduate Icon to complete download.");
//-->
</script>
<%
else
Response.Write "<table width=90% border=0><tr><td
bgcolor=#ffff55 align=center>Mail send
failure.</td></tr></table>"
end if
End If
%>



.



Report this thread to moderator Post Follow-up to this message
Old Post
connie
07-29-04 08:55 PM


Re: CDO Mail Object Help
On Thu, 29 Jul 2004 07:15:04 -0700, "connie"
<anonymous@discussions.microsoft.com> wrote:

>I have an E-mail ASP Web form that is using a CDO Mail
> Object.  This form has to be filled out before the
>customer can download our demo. Currently, the customer
>fills out the form, clicks to submit and a message appears
>to the customer telling them it was successful and to
>click on a picture on the form to download the demo. My
>problem is that many of the customer don't read the
>message.  I want to modify the code so that after the
>customer clicks SUBMIT, the info is submitted and then the
>download immediately begins without them having to take
>further action.

The CDO Mail Object can't start a download, though you could
auto-reply to a message with a file attached.  That still isn't the
CDO object.

Stop thinking about this as an email issue, it's not.  It's a forced
download issue.  Which means streaming the file.  But your real
problem is you're already responding to the form with a download link
that isn't being clicked, why don't you simply make it easier to find
and click that link?  A big "Click here to receive your file" would be
better than an obscure picture.

Jeff

> What is the code I should add to begin downloading a file
> after the form is successfully submitted.  Here's some of
> the code I am currently using:
>
> Set objMessage = CreateObject("CDO.Message")
> objMessage.Subject = "Cosmetology DEMO for " &
> Request ("Department")
>
> objMessage.From = "americassoftware@alltel.net"
> objMessage.To = "americassoftware@alltel.net"
> objMessage.TextBody = ("txtmsg")& " " & "Name: "
> &  Request("addressto")& " Dept: " & Request("Department")
> & " Telephone: " & Request ("Telephone Number") & "
> Email: " & Request ("Email Address") & " School Name: " &
> Request ("Company/School Name") & " City/State: " &
> Request ("City/State")
>    objMessage.Send
>
> mailres=objMessage.Send()
> if NOT mailres then
> %>
> <script language = "JavaScript">
> <!--
> alert("Your information has been sent.  Click on
> the Graduate Icon to complete download.");
> //-->
> </script>
> <%
> else
> Response.Write "<table width=90% border=0><tr><td
> bgcolor=#ffff55 align=center>Mail send
> failure.</td></tr></table>"
> end if
> End If
> %>
>
>
>
>.
>


Report this thread to moderator Post Follow-up to this message
Old Post
Jeff Cochran
07-29-04 08:55 PM


Re: CDO Mail Object Help
Thank you.  I think you are right.  A big "CLICK HERE" it
is!


>-----Original Message-----
>On Thu, 29 Jul 2004 07:15:04 -0700, "connie"
><anonymous@discussions.microsoft.com> wrote:
> 
appears 
the 
>
>The CDO Mail Object can't start a download, though you
could
>auto-reply to a message with a file attached.  That still
isn't the
>CDO object.
>
>Stop thinking about this as an email issue, it's not.
It's a forced
>download issue.  Which means streaming the file.  But
your real
>problem is you're already responding to the form with a
download link
>that isn't being clicked, why don't you simply make it
easier to find
>and click that link?  A big "Click here to receive your
file" would be
>better than an obscure picture.
>
>Jeff
> 
file 
of 
("Department") 
& 
>
>.
>

Report this thread to moderator Post Follow-up to this message
Old Post

07-29-04 08:55 PM


Re: CDO Mail Object Help
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Cosmetology DEMO for " &
Request ("Department")

objMessage.From = "americassoftware@alltel.net"
objMessage.To = "americassoftware@alltel.net"
objMessage.TextBody = ("txtmsg")& " " & "Name: "
&  Request("addressto")& " Dept: " & Request("Department")
& " Telephone: " & Request ("Telephone Number") & "
Email: " & Request ("Email Address") & " School Name: " &
Request ("Company/School Name") & " City/State: " &
Request ("City/State")
objMessage.Send

mailres=objMessage.Send()
if NOT mailres then
Response.redirect("thefile.zip") 'this will redirect you to the
zip/exe/whatever file and start the download, that's in IE at least.
else
Response.Write "<table width=90% border=0><tr><td
bgcolor=#ffff55 align=center>Mail send
failure.</td></tr></table>"
end if
End If
%>





"connie" <anonymous@discussions.microsoft.com> wrote in message
news:66e001c47576$71d34b40$a601280a@phx.gbl...
> I have an E-mail ASP Web form that is using a CDO Mail
>  Object.  This form has to be filled out before the
> customer can download our demo. Currently, the customer
> fills out the form, clicks to submit and a message appears
> to the customer telling them it was successful and to
> click on a picture on the form to download the demo. My
> problem is that many of the customer don't read the
> message.  I want to modify the code so that after the
> customer clicks SUBMIT, the info is submitted and then the
> download immediately begins without them having to take
> further action.
>
>  What is the code I should add to begin downloading a file
>  after the form is successfully submitted.  Here's some of
>  the code I am currently using:
>
>  Set objMessage = CreateObject("CDO.Message")
>  objMessage.Subject = "Cosmetology DEMO for " &
>  Request ("Department")
>
>  objMessage.From = "americassoftware@alltel.net"
>  objMessage.To = "americassoftware@alltel.net"
>  objMessage.TextBody = ("txtmsg")& " " & "Name: "
>  &  Request("addressto")& " Dept: " & Request("Department")
>  & " Telephone: " & Request ("Telephone Number") & "
>  Email: " & Request ("Email Address") & " School Name: " &
>  Request ("Company/School Name") & " City/State: " &
>  Request ("City/State")
>     objMessage.Send
>
>  mailres=objMessage.Send()
>  if NOT mailres then
>  %>
>  <script language = "JavaScript">
>  <!--
>  alert("Your information has been sent.  Click on
>  the Graduate Icon to complete download.");
>  //-->
>  </script>
>  <%
>  else
>  Response.Write "<table width=90% border=0><tr><td
>  bgcolor=#ffff55 align=center>Mail send
>  failure.</td></tr></table>"
>  end if
>  End If
>  %>
>
>
>
> .
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Santiago J. Crespo Mothe
07-30-04 08:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

ASP archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:28 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.