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
Solved

Form Submit.

Posted on 2002-06-28
2
243 Views
Last Modified: 2012-06-22
Hi Experts

Once a form is submitted, how can I send details of that form in the body of an email?
Is it also possible to send those details as Fax?

Thank you
0
Comment
Question by:Hafez
2 Comments
 
LVL 18

Accepted Solution

by:
mgfranz earned 100 total points
ID: 7117548
An email is simple;

Sub send_mail(toaddress, subject, bodytext)
' The code below is set to use CDO
<%
Set objCDO = Server.CreateObject("CDO.Message")
   With objCDO
        .To       = toaddress
        .From     = "sales@abc.com"
        .Subject  = subject
        .TextBody = bodytext
        .Send
   End With

On Error Resume Next
'Mail.Send
If Err <> 0 Then
     Response.Write "Error encountered: " & Err.Description
'Else
     'Response.Write "Message Sent"
End If

Set objCDO = Nothing
'Set Mail = Nothing

End Sub

dfname = Request("fName")
strFrom = Request("from")
tracking = Request("fed_Track")

body1="Dear " & dfname&"," & VbCrLf &VbCrLf & "Thank you for shopping at ABC.COM.  We have shipped your order via FedEx."  & VbCrLf  & VbCrLf
     body3="Your FedEx order tracking number is " & tracking&"."  & VbCrLf  & VbCrLf
     body4="Please use this number when visiting FedEx.com to track your order." & VbCrLf & VbCrLf

     strBody = body1 + body3 + body4

     send_mail rsorder("email"), strFrom, strBody
%>

Sending a Fax is going to be tougher...  There are a few software applications that can do this, but I have never played with any of them.
0
 
LVL 2

Expert Comment

by:rdmjrb
ID: 7117659
This site details how to use CDONTS to send emails from forms using the built-in (IIS 4.0 +) NewMail dll.

http://support.microsoft.com/default.aspx?scid=kb;EN-US;q186204

If you are an ASPTODAY member they have an excellent article on how to do this and configure IIS.

The code will run on most IIS web servers (hosted) and if you have your own then you wil need to configure it with a valid SMTP mail server, as both articles specify.

To send to a fax is a little more tricky. I have been successful by doing the following:
1. Send a successful email.
2. Get a standard account at eFax.com - very cheap (or another similar site you find)
3. eFax gives you an email address that you can use to send faxes.
4. Use this email account in your application, pass in the fax number you wish to fax to and send it out like a normal email.

I will send you the code I specifically used if you like but that is the basics of the application. By eFax giving you an email account, anything that is sent here will be faxed. That's the beauty, it's a work-around, and its not so clean but it works.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Filter Question 8 86
Send to Print Preview database record with one click 3 61
Passing Parameter to Stored Procedure 4 27
Time comparison asp 1 14
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

828 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