WebGirlCrissy
asked on
need form mail for asp site (NT)
hi - I just transferred a website from one host to another. Its a windows based site using .asp files. I need to get the form mail to work. Last provider had ASPMail component, this new host does not have any component and email is with a third party host - I have a plesk control web panel. anyone know how i can get form mail to work here?
using a test script i found online here:
http://www.brainjar.com/asp/formmail/
but unable to get that to work. Any advise would be great!
using a test script i found online here:
http://www.brainjar.com/asp/formmail/
but unable to get that to work. Any advise would be great!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thank you!
Great.
In order to make this easy for me on multiple pages I keep this code on a separate page as a function and add it as an in include file on any page I need to send mail.
Sometimes I get really fancy and have a separate template file where I keep things like the header, footer, background etc that is also in a separate include file.
In order to make this easy for me on multiple pages I keep this code on a separate page as a function and add it as an in include file on any page I need to send mail.
function SendMail(from,to,subject,body)
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = subject
objMessage.From = from
objMessage.To = to
' objMessage.TextBody = "This is some sample message text."
objMessage.HTMLBody = body
objMessage.Send
end function
Sometimes I get really fancy and have a separate template file where I keep things like the header, footer, background etc that is also in a separate include file.
function template(body)
html="<table><tr><td>header</td></tr>"
html=html&"<table><tr><td>"&body&"</td></tr>"
html=html&"<table><tr><td>footer</td></tr>"
template=html
end function
function SendMail(from,to,subject,body)
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = subject
objMessage.From = from
objMessage.To = to
' objMessage.TextBody = "This is some sample message text."
objMessage.HTMLBody = template(body)
objMessage.Send
end function
ASKER