Solved

VB Script Question

Posted on 2003-12-08
10
244 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
 
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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 1

Accepted Solution

by:
Jagata earned 250 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now