Hi i need to send an e-mail when a record is updated with the ..-edit.asp page.
You send me a piece of code that doesn't work for me. The server hosting our site is using ASPSmartMail. So we have to use it.
Here is the code to send the e-mail but i don't know where to put it.
<%
On error resume next
Dim mySmartMail
Set mySmartMail = Server.CreateObject("aspSmartMail.SmartMail")
' Mail Server
' *
mySmartMail.Server = "smtp.datasecure.net"
' From
'
mySmartMail.SenderName = "Your Name" ; want to be from a database field
mySmartMail.SenderAddress = "youremail@yourdomain.com" ; want to be from a database field
' To
' *
mySmartMail.Recipients.Add "yourfriend@anydomain.com", "Friend's name" ; want to be from a database field
' Message
'
mySmartMail.Subject = "aspSmartMail Sample 1"
mySmartMail.Body = "This mail has been sent with aspSmartMail." ; want to be from a database field along with text
' Send the message
' ****
mySmartMail.SendMail
if Err.Number<>0 then
Response.write "Error: " & Err.description
else
Response.write "An e-mail has just been sent to " & mySmartMail.Recipients.Item(1).Name & "."
end if
%>
Can you help me please...
Thanks