Hi Tyson,
Are you aware of an invention called "the dot"? They are usually used at the end of a sentence, making your posts easier to read ;)
Just kidding. Anyway, if you are really new to all this, setting up your own SMTP server might be quite some trouble, and difficult to explain in a forum.
To learn how to install and set up your own SMTP server, take a look at
this article.
Alternatively, you can decide to use a third-part component that allows you to set the SMTP server of your provider (like smtp.YourProvider.com)
There are some free components available, including
ASP Email. Take some time to read the documentation. There is lots of sample code and help available.
If you consider the example on page 250 of the book, here's how your code could look (notice I am still using the CDONTS.NewMail object I showed you earlier:
If strContact = "email" then
' It used to say Response.Write("We will email.... etc")
but I replaced that with the e-mail code
Dim objMsg
Set objMsg = Server.CreateObject("CDONTS.NewMail")
'---- BodyFormat Property ----
Const CdoBodyFormatHTML = 0 ' The Body property is to include
' Hypertext Markup Language (HTML).
Const CdoBodyFormatText = 1 ' The Body property is to be
' exclusively in plain text
' (default value).
'---- MailFormat Property ----
Const CdoMailFormatMime = 0 ' The NewMail object is to be in
' MIME format.
Const CdoMailFormatText = 1 ' The NewMail object is to be in
' uninterrupted plain text
' (default value).
With objMsg
.To = strEmail
.From = "
[email protected]"
.Subject = "The subject of the message"
.BodyFormat = CdoBodyFormatText ' or CdoBodyFormatHTML
.MailFormat = CdoMailFormatMime ' or CdoMailFormatText
.Body = "Thanks for your response on our website bla bla bla."
.Send
End with
Set objMsg = Nothing
End If
Hope this clarifies things a bit.
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.