Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

SMTP Mail (ASP)

Posted on 1999-06-23
3
Medium Priority
?
215 Views
Last Modified: 2013-12-25
Hi,
   I am a newbie in ASP programming. I have this working web order program, now I want to email the customer the detail of their order right after the session is over.  I put all the items into a "bag" but I couldn't find a way to list of in the mail body text... array will return a type mismatch...
   Had anyone done this before and know the syntax and logic? Please help. Here is a part of the code

dim currTotal
for i = 1 to ItemCount
currTotal = currTotal + (bag(BagPrice, i) * bag(BagItemQuantity, i))

body = bag(BagProductId, i) & "   " & bag(BagProductName, i) & "  " & bag(BagItemQuantity, i) & "  " & FormatCurrency(bag(BagPrice, i)) & VbCrLf

next

Mailer.BodyText = body & VbCrLf & body2 & VbCrLf & "Total: " & FormatCurrency(currTotal) &_
VbCrLf & VbCrLf & "Thank you."

Once it emails, only the last item in the array shows....

Thanks in advance for your help,
Steve.
0
Comment
Question by:stephenhoang
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 3

Expert Comment

by:sidcap
ID: 1863469
body is reseted every time, you are using the last body assigned within the loop; just write body = body & bag(......)............. & VbCrLf
0
 

Author Comment

by:stephenhoang
ID: 1863470
To: Sidcap
  Whoa, it worked :) thank you. Please answer so I can give you the points :)
Thanks again :)
Steve.

0
 
LVL 3

Accepted Solution

by:
sidcap earned 400 total points
ID: 1863471
body is reseted every time, you are using the last body assigned within the loop; just write body =
      body & bag(......)............. & VbCrLf
0

Featured Post

Plesk WordPress Toolkit

Plesk's WordPress Toolkit allows server administrators, resellers and customers to manage their WordPress instances, enabling a variety of development workflows for WordPress admins of all skill levels, from beginners to pros.

See why 2/3 of Plesk servers use it.

Question has a verified solution.

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

Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
This video teaches users how to migrate an existing Wordpress website to a new domain.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
Suggested Courses

661 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