• 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

    • You will soon have fewer reasons to open Control Panel in Windows 11 by Taras Buria Good news: more Control Panel bits are making their way to the Settings app, giving you fewer reasons to use the legacy UI that Microsoft buried deep inside its operating system. This time, the company is migrating certain clock-related settings, giving them a more modern look in the Settings app. The upgraded Settings app now lets you enable additional clocks in the notification center and adjust AM/PM indicators. These features work the same as they do in the legacy Control Panel: you can enable up to two additional clocks for two extra time zones and name them as you wish. Thanks to the redesign, the UI for setting up additional clocks supports dark and light themes, bigger UI elements, and improved accessibility. The same goes for the AM/PM indicators: you can customize them in Settings > Time & Language > Language & Region > Regional Format. Other Control Panel bits that recently made their way to the Settings app include some keyboard settings. Microsoft has not confirmed any of those changes yet, so stand by for announcements in future preview builds. Speaking of preview builds, this week, Microsoft released a new Canary build with improved context menus, taskbar changes, new accessibility features, and more. Check out the full release notes here.
    • Everything 1.4.1.1028 by Razvan Serea "Everything" is search engine that locates files and folders by filename instantly for Windows. Unlike Windows search "Everything" initially displays every file and folder on your computer (hence the name "Everything"). You type in a search filter to limit what files and folders are displayed. "Everything" only indexes file and folder names and generally takes a few seconds to build its database. A fresh install of Windows 10 (about 120,000 files) will take about 1 second to index. 1,000,000 files will take about 1 minute. "Everything" will run on Windows XP, Vista, Windows 7, Windows 8, Windows 10 and Windows 11. NTFS indexing requires the Everything service or running "Everything" as administrator. What is the Lite version of "Everything"? The Lite version of Everything is the same as the normal multilingual version of Everything, except it has some features removed: Removed ETP/FTP Server. Removed HTTP Server. Removed IPC. The Command line interface / ES will not work with the Lite version. The SDK will not work with the Lite version. Windows accessibility features and screen readers will not work with the Lite version. Everything 1.4.1.1028 changes: fixed a crash when getting help text from a context menu item that throws an exception. updated localization. "Everything" is Freeware. If you use "Everything" in a commercial environment and find it useful a donation would be appreciated. Download: Everything 1.4.1.1028 64-bit | Portable ~1.0 MB (Freeware) Download: Everything 1.4.1.1028 32-bit | Portable Download: Lite 32-bit | Lite 64-bit View: Everything Website | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • So you just don't like the statement? That's completely different than the statement not being true. And one doesn't have to be "full of hate" to acknowledge a cow is, in fact, a cow.
    • They are trying to pretend there is demand for this crap. That it's for special, wealthy, niche customers only right now. You know, the Apple marketing model.
    • Allow all task bar elements on all monitors, allow us to move around any taskbar element. When in Desktop mode, separate the icons in the system tray area only combine them when in touch mode.
  • Recent Achievements

    • Week One Done
      BlakeBringer earned a badge
      Week One Done
    • Week One Done
      Helen Shafer earned a badge
      Week One Done
    • First Post
      emptyother earned a badge
      First Post
    • Week One Done
      Crunchy6 earned a badge
      Week One Done
    • One Month Later
      KynanSEIT earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      669
    2. 2
      ATLien_0
      273
    3. 3
      Michael Scrip
      232
    4. 4
      Steven P.
      163
    5. 5
      +FloatingFatMan
      160
  • Tell a friend

    Love Neowin? Tell a friend!