23 lines
502 B
Plaintext
23 lines
502 B
Plaintext
|
<%
|
||
|
Function SendMail(mTo , mFrom , mSubject , mBody)
|
||
|
Set objCdonts = Server.CreateObject("CDONTS.NewMail")
|
||
|
objCdonts.To = mTo
|
||
|
objCdonts.From = mFrom
|
||
|
objCdonts.Subject = mSubject
|
||
|
objCdonts.Body = mBody
|
||
|
objCdonts.Send
|
||
|
Set objCdonts = Nothing
|
||
|
If Err Then
|
||
|
SendMail = False
|
||
|
Else
|
||
|
SendMail = True
|
||
|
End If
|
||
|
End Function
|
||
|
%>
|
||
|
|
||
|
and to call the function we can use something like this
|
||
|
|
||
|
<%
|
||
|
SendMail "youremail@email.com" , "myemail@email.com" , "testing" , "testing again"
|
||
|
%>
|