This topic is locked

Automatic e-mail

12/22/2005 12:07:23 PM
ASPRunnerPro General questions
P
pharaon_98 author

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

Sergey Kornilov admin 12/23/2005

If you are ASPRunnerPro customer send ..._edit.asp file to support@xlinesoft.com and I'll help with this.