[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

VB Script Question

Posted on 2003-12-08
10
Medium Priority
?
252 Views
Last Modified: 2010-04-06
I have a webpage that has a form on it with a few fields in the form.  I want to be able to click on a button and have the information in the form emailed to a certain email address.

So I would like to know how to do this using VB Script if it's possible.

Thanks.
0
Comment
Question by:ecohouse
  • 5
  • 3
  • 2
10 Comments
 
LVL 1

Expert Comment

by:Jagata
ID: 9901437
Check out DundasMailer which is a free component to do this;

   http://www.dundas.com/other/dundasmailer/index.aspx?Section=DundasMailer&Body=body.htm

And also check out w3 JMail Free which we use at work;

   http://www.dimac.net/
0
 

Author Comment

by:ecohouse
ID: 9905520
Thanks for the information.  But isn't there a simple way to just code this using either VB Script or ASP instead of having to get a component?
0
 
LVL 35

Expert Comment

by:YZlat
ID: 9906056
add action="mailto:yourname@domain.com" to a <form> tag:

<form name="myForm" method="post" action="mailto:yourname@domain.com">
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 35

Expert Comment

by:YZlat
ID: 9906065
let me know if that's what you looking for
0
 

Author Comment

by:ecohouse
ID: 9907853
Thanks for the help.  I'm new to webpages.  Where do I be put the code you gave me on the form?  Do I need to create a function?

And how does it take all of the information from the form?
0
 
LVL 1

Accepted Solution

by:
Jagata earned 1000 total points
ID: 9908110
I would highly suggest getting a component. Specifically I would go with w3 JMail. Here is an example of implementation;

      Set JMail = Server.CreateObject("JMail.SMTPMail")
      JMail.Silent = False
      JMail.Logging = True
      JMail.ServerAddress = "192.168.1.248"
      JMail.Sender = pstrEmailAddress 'Variable containing sender email address.
      JMail.AddRecipient "email@email.com" 'Your email address.
      JMail.Subject = pstrSubject 'Variable containing subject for email.
      JMail.ContentType = "text/html"
      JMail.Body = pstrBody 'Variable containing content of email.
      JMail.Execute

With all respect to YZlat, the other approach is not the best method.

"This method does not work with every browser, but does work with Microsoft Internet Explorer, Mozilla/Netscape, and the old Netscape 4.x browsers, which are used by 95% or more of users at the time of this writing. The biggest disadvantage: as of this writing, Microsoft Internet Explorer will display a warning to the user, pointing out that submitting a form by email will disclose their email address to the recipient, and asking if they really want to do that." - boutell.com
0
 
LVL 35

Expert Comment

by:YZlat
ID: 9910208
<html>
<body>

<form name="myForm" method="post" action="mailto:yourname@domain.com">


'***YOUR FORM FIELDS GO HERE



</form>
</body>
</html>
0
 
LVL 35

Expert Comment

by:YZlat
ID: 9910212
Jagata, when you simply want to e-mail the forn's results that method works just fine. It seems like ecohouse does not want to composen an e-mail but simply e-mail the results of the form
0
 
LVL 35

Expert Comment

by:YZlat
ID: 9910219
besides, ecohouse is using html and vbscript, not asp.
0
 
LVL 1

Expert Comment

by:Jagata
ID: 9910248
YZlat, If you want to discuss the flaws of submitting a form via email, open a question with some points for me, otherwise I couldn't care less.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

834 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