CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeCharge.Discussion

 Email contents of form in ASPMAIL

Print topic Send  topic

Author Message
Stuart Sammels
Posted: 08/29/2001, 12:41 PM

I am trying to email the contents of the shopping cart. When the customer
clicks on complete order they are sent to the final page. When they reach
this final page the orders table is emptied and the purchases table is
updated. Everything is working fine but I now need to mail the contents from
the final page.

To test I entered this to mail only 1 form (Items) and I receive the mail
but there is no information other than the subject.

Dim Mailer
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName = "My site."
Mailer.FromAddress = "administration@mysite.com"
Mailer.RemoteHost = "mail.mysite.com"
Mailer.AddRecipient "Stuart Sammels", "highlanddesigns@hotmail.com"
Mailer.Subject = "Purchase"
Mailer.BodyText = Request.Form ("name") & vbcrlf
Mailer.BodyText = Request.Form ("price") & vbcrlf
Mailer.BodyText = Request.Form ("quantity")
Request.Form ("Items")

on error resume next ' Ignore Errors
Mailer.SendMail
Set Mailer = Nothing


I believe this is close but how do I receive the contents of the form?

I have no asp background but I have a pretty good idea of what I am doing.

Also how to mail the CCInfo and Total in same email?

Is this close?

Dim Mailer
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName = "My site."
Mailer.FromAddress = "administration@mysite.com"
Mailer.RemoteHost = "mail.mysite.com"
Mailer.AddRecipient "Stuart Sammels", "highlanddesigns@hotmail.com"
Mailer.Subject = "Purchase"
Mailer.BodyText = Request.Form ("name") & vbcrlf
Mailer.BodyText = Request.Form ("price") & vbcrlf
Mailer.BodyText = Request.Form ("quantity") & vbcrlf
Mailer.BodyText = Request.Form ("first_name") & vbcrlf
Mailer.BodyText = Request.Form ("last_name") & vbcrlf
Mailer.BodyText = Request.Form ("card_number") & vbcrlf
Mailer.BodyText = Request.Form ("expdate") & vbcrlf
Mailer.BodyText = Request.Form ("address") & vbcrlf
Mailer.BodyText = Request.Form ("city") & vbcrlf
Mailer.BodyText = Request.Form ("state") & vbcrlf
Mailer.BodyText = Request.Form ("zipcode") & vbcrlf
Mailer.BodyText = Request.Form ("country") & vbcrlf
Mailer.BodyText = Request.Form ("email") & vbcrlf
Mailer.BodyText = Request.Form ("phone") & vbcrlf
Mailer.BodyText = Request.Form ("sub_total")
Request.Form ("Items")
Request.Form ("CCInfo")
Request.Form ("Total")


on error resume next ' Ignore Errors
Mailer.SendMail
Set Mailer = Nothing


This is the final stage of the site and any help will be greatly
appreciated.

Stuart Sammels

Alexey Alexapolsky
Posted: 08/30/2001, 5:48 AM

Something like this :

Mailer.BodyText = Mailer.BodyText & GetParam ("name") & vbcrlf
Mailer.BodyText = Mailer.BodyText & GetParam ("price") & vbcrlf
Mailer.BodyText = Mailer.BodyText & GetParam ("quantity") & vbcrlf
Mailer.BodyText = Mailer.BodyText & GetParam ("first_name") & vbcrlf

make sure that variabl names passed to getParam function are equal to
field names at your last form that is submitted to this page.


--
Alex


Stuart Sammels <highlanddesigns@hotmail.com> wrote in message
news:9mjggn$j66$1@news.codecharge.com...
> I am trying to email the contents of the shopping cart. When the customer
> clicks on complete order they are sent to the final page. When they reach
> this final page the orders table is emptied and the purchases table is
> updated. Everything is working fine but I now need to mail the contents
from
> the final page.
>
> To test I entered this to mail only 1 form (Items) and I receive the mail
> but there is no information other than the subject.
>
> Dim Mailer
> Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
> Mailer.FromName = "My site."
> Mailer.FromAddress = "administration@mysite.com"
> Mailer.RemoteHost = "mail.mysite.com"
> Mailer.AddRecipient "Stuart Sammels", "highlanddesigns@hotmail.com"
> Mailer.Subject = "Purchase"
> Mailer.BodyText = Request.Form ("name") & vbcrlf
> Mailer.BodyText = Request.Form ("price") & vbcrlf
> Mailer.BodyText = Request.Form ("quantity")
> Request.Form ("Items")
>
> on error resume next ' Ignore Errors
> Mailer.SendMail
> Set Mailer = Nothing
>
>
> I believe this is close but how do I receive the contents of the form?
>
> I have no asp background but I have a pretty good idea of what I am doing.
>
> Also how to mail the CCInfo and Total in same email?
>
> Is this close?
>
> Dim Mailer
> Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
> Mailer.FromName = "My site."
> Mailer.FromAddress = "administration@mysite.com"
> Mailer.RemoteHost = "mail.mysite.com"
> Mailer.AddRecipient "Stuart Sammels", "highlanddesigns@hotmail.com"
> Mailer.Subject = "Purchase"
> Mailer.BodyText = Request.Form ("name") & vbcrlf
> Mailer.BodyText = Request.Form ("price") & vbcrlf
> Mailer.BodyText = Request.Form ("quantity") & vbcrlf
> Mailer.BodyText = Request.Form ("first_name") & vbcrlf
> Mailer.BodyText = Request.Form ("last_name") & vbcrlf
> Mailer.BodyText = Request.Form ("card_number") & vbcrlf
> Mailer.BodyText = Request.Form ("expdate") & vbcrlf
> Mailer.BodyText = Request.Form ("address") & vbcrlf
> Mailer.BodyText = Request.Form ("city") & vbcrlf
> Mailer.BodyText = Request.Form ("state") & vbcrlf
> Mailer.BodyText = Request.Form ("zipcode") & vbcrlf
> Mailer.BodyText = Request.Form ("country") & vbcrlf
> Mailer.BodyText = Request.Form ("email") & vbcrlf
> Mailer.BodyText = Request.Form ("phone") & vbcrlf
> Mailer.BodyText = Request.Form ("sub_total")
> Request.Form ("Items")
> Request.Form ("CCInfo")
> Request.Form ("Total")
>
>
> on error resume next ' Ignore Errors
> Mailer.SendMail
> Set Mailer = Nothing
>
>
> This is the final stage of the site and any help will be greatly
> appreciated.
>
> Stuart Sammels
>
>

Stuart Sammels
Posted: 08/30/2001, 9:45 AM

Thank you but I got help form CC Support earlier this morning. On the
Verisign return page I wanted to email the contents but the forms had to be
combined.

This is the code I needed.

Dim Mailer
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName = "MYSITE."
Mailer.FromAddress = "administration@mysite.com"
Mailer.RemoteHost = "mail.myisp.com"
Mailer.AddRecipient "Me", "myemail@hotmail.com"
Mailer.Subject = "Purchase"
Mailer.BodyText = "CUSTOMER ORDER" & vbcrlf & vbcrlf
Mailer.BodyText = Session("OrderInfo") & TotalPart & Session("UserPart")

TotalPart = "Total: " & fldsub_total & chr(13) &_
""

on error resume next ' Ignore Errors
Mailer.SendMail
Set Mailer = Nothing


Thanks again CC Support.




"Alexey Alexapolsky" <alexa@codecharge.com> wrote in message
news:9mlcmc$o8i$1@news.codecharge.com...
> Something like this :
>
> Mailer.BodyText = Mailer.BodyText & GetParam ("name") & vbcrlf
> Mailer.BodyText = Mailer.BodyText & GetParam ("price") & vbcrlf
> Mailer.BodyText = Mailer.BodyText & GetParam ("quantity") & vbcrlf
> Mailer.BodyText = Mailer.BodyText & GetParam ("first_name") & vbcrlf
>
> make sure that variabl names passed to getParam function are equal to
> field names at your last form that is submitted to this page.
>
>
> --
> Alex


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.