Internet Commerce

Partners & Affiliates

Developer Channel


Featured Flash FLA
Gallery Downloads 11401 Flash Movies | 5 New Flash Movies Added
What's New | Top 100

Featured FLA

»  Author: Nick Kouvaris
»  Title: Znax
»  Description: Znax is a board game. Click 4 tiles of the same color and form squares as big as you can. You will erase all the tiles inside the square and collect points. Get maximum score if you make a square with game edges.
»  More by: Nick Kouvaris


Random FLAs | Add Flash Movie
Featured Flash Site
Gallery Downloads 4941 Flash Sites | 1 New Flash Links
What's New | Top 100 Flash Site

Featured Site

»  Author Agence WOP Digital Agency
»  Title: Electricdrum
»  Description: French WOP Agency, 3D websites, Flash (Papervision, Away 3D), event or institutional projects. The agency operates on all digital projects: consulting, design, graphic design, development, online communication. The WOP agency follows you on the implementation of original, creative and optimized digital projects.


Random Links | Add your own Flash Related Links
Flash Tutorials 1481 Tutorials 7 New Tutorials Added!
What's New | Top100

» How To Make A Simple Animation Using Christmas Clips
» Simple Step by step flash game tutorial Spot the diffrence
» How To Make A Moving Text Slide
» Create Flash Banner With Text Float Effect
» How To Make Zoo Photos Slideshow
» How To Make A Dolphin Photos Slideshow
» How To Make A Fathers Day Slideshow
» How To Make A Transparent Background of Your Flash File
» Create Flash Banner With Text Disco Light Effect Today we will introduce you a Text Disco Light eff
» Unknown Tag: Title10
Random Tutorial | Add Site


Tutorials Home What's New Top Rated Submit myTutes Random!

Search Tutorials


Tutorials Tutorials » Dynamic_Content

Categories E-mail in Flash the Easy way
Author: Jeffrey F. Hill | Website: http://www.flash-db.com |

 
Page 7
«prev 1 2 3 4 5 6 7 8 next»

Option 3 - Setting up the ASP script to send mail with ASP

The following script shows you how to send mail with ASP - it works similar to the two methods shown above. This script is from a Popular Windows 2000 Hosting service called innerhost.  The main difference between a PHP based mailing script and an ASP based mailing script is the use of a mailing object. Many Win NT/2K Hosts have the Smtpsvg.dll registered on their servers. If they do not, please check with the Host to see what sort of mail object they do use. The code below is pretty self-explanatory. On line 12, be sure to change “mail.innerhost.com” to the SMTP mail server that your host provides. Also make sure to change lines 7-10 to your Name, Email, Subject etc.  This e-mail will work in the same manner as the previous two examples.

1)   <?
2)  FirstName = Request.form("FirstName")
3)  Email = Request.form("Email")
4)  Company = Request.form("Company")
5)  ToComments = Request.form("ToComments")
6)  HearAbout = Request.form("HearAbout")
7)  strName = "Your Name"
8)  strEmail = "YourEmail@YourSite.com"
9)  strSubject = "Tutorial Request Example Email"
10) strBody = ToComments & HearAbout & Company
11)  Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
12)  Mailer.RemoteHost = "mail.innerhost.com"
13)  Mailer.FromName = FirstName
14)  Mailer.FromAddress = Email
15)  Mailer.AddRecipient strName, strEmail
16)  Mailer.Subject = (strSubject)
17)  Mailer.BodyText = strBody
18)  if Mailer.SendMail then
19)  Response.Write "_root.Mail.EmailStatus=Complete - Your mail has been sent"
 else
20)  Response.Write "_root.Mail.EmailStatus=Failure - Your mail was not sent - errors"
21)  Response.Write Mailer.Response
22)  end if
23)  ?>

Line 1 -  Starts the ASP script

Lines 2  to 6 - This captures the data sent with the header information from the post command and puts it into a format that the asp script can use. 

Lines 7 to 8 - Sets the Name and E-mail address to which you are sending this information to.  Make sure to change this to your own name and e-mail if you are going to be receiving this e-mail (or to the person that is).  

Line 9 - This sets the subject line of the message that you are sending.

Line 10 - Formats the contents of the inputted information into the Body of the Email.

Line 11 - This sets the Mailing object, that enables the script to send the E-mail.  This may be different, SMTPsvg.Mailer is the most common Mailing Object but can be different depending on your server. 

Line 12 - Make sure to change this according to your Host.

Lines 13 to 17 - Sets up the e-mail and assigns each different E-mail field it's previously defined vale. 

Lines 18 to 22 - Just checks to see if the mail was sent - If it was it prints out a Complete/success message back to the Flash movie.  If it was not successful then an error message is sent back to the flash movie.  

And that's about it with the ASP section - Remember that because of the wide variety of server setups and the ways that individual hosting services set up their server, this will not work all the time.  I tried to give the most general widely used examples - but you may have to contact your host for further information. 

«prev 1 2 3 4 5 6 7 8 next»

» Level Advanced

Added: : 2001-08-27
Rating: 8.79 Votes: 328
Hits: 12945
» Author
No details available.
» Download
Download the files used in this tutorial.
Download (67 kb)
Get conversion and unzipping tools for PC and Mac here!

» Forums
More help? Search our boards for quick answers!

Please rate this tutorial, 10 is the top rating, you can also click the comments link to read/write a review.
10 9 8 7 6 5 4 3 2 1
Read or Post Comments