• 0

form to email (SMTP) script for IIS


Question

2 answers to this question

Recommended Posts

  • 0

http://www.toaststudios.com/magicemail.zip

I wrote an ASP script called magicmail.asp that does what you are needing. The only limitation is that it uses ADISCON SimpleMail component to send the mail. You can get a shareware version of the component over at:

http://www.adiscon.com/en/

It shouldn't be hard to configure it to work with another mail component (such as JMail or CDONTS).

Here is how you use it:

You build your form and make sure you name all your form objects.

Then you add the following "hidden" input types:

"to_email" | the address that the form will be mailed too

"number_of_items" | the number of items that will be included in the email.

"from_email" | the from address that will be attatched to the email

"subject_email" | the subject of the email

"title" | the header of the email

"items" : (this is kind of confusing so read carefully)

the value of this hidden field can take on the form of:

"item1, item2, item3, item4..." so each item is seperated by a comma (where an item is the NAME of each field that will be submitted in the email)

or it can also take the form:

"Catagory Name: item1, item2, item3 | Catagory2 Name: item4, item5, item6 | Catagory3 Name: item7, item8" and so forth.

I found a need to be able to seperate different items into catagories and this is how I decided to do it. My script is pretty picky on the spacing :( (i'll fix that in the next version).

The last hidden field is:

"redirect_to" | this is the URL that the user will goto after submitting the information.

Here is an example of an html form that uses magicemail.asp:

---------------------------------------------

This is a test of magicemail.asp

Personal Information

Name:

Address:

E-Mail Address:

Additional Information

More Information:

Even More Information:

---------------------------------------------------

I also made the email pretty custimizable. If you crack open magicemail.asp in notepad and scroll down to the"Stylization:" comment it should be pretty straight forward on how to fix the HTML the way you want so that the email looks the way you want.

if you have any questions don't hesitate to PM me ! :)

-Nic

  • 0

If you have the CDO NTS library installed, it's as simple as creating an object:

Set oMail = Server.CreateObject("CDONTS.NewMail")

oMail.To = "me@msn.com"

oMail.From = "you@msn.com"

oMail.Subject = "Hi!"

oMail.Body = "Test email, 1,2,3"

oMail.Send

Set oMail = Nothing.

Go here to learn more from MSDN.

Or download the FREE .Net framework and use the email features available from ASP.Net. Learn about that here.

Any other questions, feel free to email me.

intentionallyu@msn.com

iUk

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Anno 117: Pax Romana gets a November release date as Ubisoft unveils Governor's Edition by Pulasthi Ariyasinghe Ubisoft's long-running city-building and management franchise, Anno, was first revealed to be receiving another entry back in 2024. While it has taken some time, Anno 117: Pax Romana finally received a firm release date today during the 2025 PC Gaming Show event just as pre-orders open up. Catch the latest cinematic trailer above. Anno 117: Pax Romana lands on November 13, 2025, letting fans loose on the Roman settlement-building venture. The game's first gameplay was revealed just a few weeks ago as well, which you can watch by heading here. As new features, the title is adding a province selection mechanic at the start of each game, a religion system, a research tree, land combat, modular shipbuilding, and, most importantly, diagonal roads and building construction. Those who pre-order the game will also receive a Builder Pack from today. This will carry the Wolf player sigil, a matching battle standard, the Town Crier statue, as well as the Capitoline Wolf statue. At the same time, a Gold Edition is available for pre-order that bundles the Year 1 Pass with the base game. This will carry access to three DLC packs, and judging by the teaser image, it looks like players will be heading to Egypt for new adventures as part of the expanded content. For fans who may want something a little more comprehensive, Ubisoft also unveiled the Anno 117 Governor’s Edition. This special edition comes with these collector's items and digital goodies: Collector's items: Amphitheatre 3D Puzzle (36 x 31 x 13 cm) 84-page Artbook featuring concept art and behind-the-scenes content - cover design elected by community! Forged Anno Symbol (approx. 7 cm) Albion & Latium Coins Steelbook® case - design elected by community! Town Crier's Letter (21 x 30 cm) Tesserae Works Blueprint (42 x 59 cm) 3 Lithographs (30 x 15 cm) Digital Content: Base Game Year 1 Pass, including: 3 upcoming DLCs Additional in-game content The Builder Pack: 3 exclusive ornaments 1 player sigil Anno 117: Pax Romana is slated to hit Steam, Ubisoft Connect, Epic Games Store, Xbox Series X|S, and PlayStation 5 platforms. Pre-orders are now available starting at $59.99 for the standard edition. Ubisoft+ subscribers will also receive the title as a day-one drop. In addition to the base game, members will also receive access to the upcoming DLC packs at launch for no extra cost.
    • Once the first went to a full version number, some just egregiously long numbers with every iteration of compilations/dates/times... what have you, it was a landslide. Long gone are the days of IE version 6, 7... now it's Edge 137.0.3296.16. So, why not iOS 2026.18.8778.322.10.800? Shocked that Edge isn't 2025.137.0.3296.16... seriously. When Samsung went from S10 to S11, to S20... to S21... I thought they were just doing new iterations of the same/similar models, then the next would have logically been S30/S31... but nope. Oh well... better things to think about then version numbers, leave that to the devs.
    • The problem -- as pointed to by the PowerShell output I quoted above -- was that for some reason it couldn't download the NuGet provider. Here's what did work: (1) Download the raw nupkg file (set-inetpubfolderacl.1.0.0.nupkg) from https://www.powershellgallery....s/Set-InetpubFolderAcl/1.0; (2) Extract (e.g., via 7-Zip) the Set-InetpubFolderAcl.ps1 file into C:\Program Files\WindowsPowerShell\Scripts; (3) Run the script via PowerShell as described in the quite thorough instructions given at https://www.windowslatest.com/...t-on-windows-11-windows-10/ . That worked for me, or seemed to. Oh, relief!
    • I like the show's/comic's violence being represented here, as so many others avoid it. Timing is key with this release due to the Marvel Tokon title.
  • Recent Achievements

    • First Post
      George Almeyda earned a badge
      First Post
    • Reacting Well
      BlakeBringer earned a badge
      Reacting Well
    • Reacting Well
      Lazy_Placeholder earned a badge
      Reacting Well
    • Dedicated
      Epaminombas earned a badge
      Dedicated
    • Veteran
      Yonah went up a rank
      Veteran
  • Popular Contributors

    1. 1
      +primortal
      469
    2. 2
      +FloatingFatMan
      265
    3. 3
      ATLien_0
      235
    4. 4
      snowy owl
      219
    5. 5
      Edouard
      171
  • Tell a friend

    Love Neowin? Tell a friend!