Welcome to WebmasterWorld Guest from 54.166.227.36

Forum Moderators: brotherhood of lan & mack

Message Too Old, No Replies

Email page

     
8:58 am on Oct 6, 2003 (gmt 0)

10+ Year Member



Iam tryin to create a page that will send an email straight from my server as an email.

E.g.

First Name < text box >
Surname < text box >
Email < text box >

etc

I think its the same as saving to my db, but also sending via a form. Whats the line to post it as an email in a form?

Cheers

9:04 am on Oct 6, 2003 (gmt 0)

10+ Year Member



In which language?
9:09 am on Oct 6, 2003 (gmt 0)

10+ Year Member



sorry :)

vbscript (asp)

9:31 am on Oct 6, 2003 (gmt 0)

10+ Year Member



Try something like:

<%
Dim myMail
Set myMail = CreateObject("CDONTS.NewMail")
myMail.From = request("email")
myMail.To = "me@mydomain.com"
myMail.Subject = request("subject")
myMail.Body = request("message")
myMail.Send
Set myMail = Nothing

%>

thats assuming you post fields called email, subject and message to the page...

11:58 am on Oct 7, 2003 (gmt 0)

10+ Year Member



And also that you have cdonts installed on your server...

Mac

12:15 pm on Oct 7, 2003 (gmt 0)

10+ Year Member



...yes that's fairly important for that code to work ;)
 

Featured Threads

Hot Threads This Week

Hot Threads This Month