I even tried to do something like that...
[code]
<%
'Function to send an e-mail
Function SendMail(ByVal strEmailBodyMessage, ByVal strRecipientName, ByVal strRecipientEmailAddress, ByVal strFromEmailName, ByVal strFromEmailAddress, ByVal strSubject, strMailComponent, blnHTML)
'Dimension variables
Dim objCDOSYSMail 'Holds the CDOSYS mail object
Dim objCDOMail 'Holds the CDONTS mail object
Dim objJMail 'Holds the Jmail object
Dim objAspEmail 'Holds the Persits AspEmail email object
Dim objAspMail 'Holds the Server Objects AspMail email object
Dim strEmailBodyAppendMessage 'Holds the appended email message
'Check the email body doesn't already have Web Wiz Forums
If blnLCode = True Then
'If HTML format then make an HTML link
If blnHTML = True Then
strEmailBodyAppendMessage = "<br /><br /><br /><hr />Software provided by <a href=""
Web'>http://www.webwizforums.com"">Web Wiz Forums</a> version " & strVersion & " -
http://www.webwizforums.com<br />Free ASP Bulletin Board System - Download your <strong>free</strong> copy today!"
'Else do a text link
Else
strEmailBodyAppendMessage = VbCrLf & VbCrLf & "---------------------------------------------------------------------------------------"
strEmailBodyAppendMessage = strEmailBodyAppendMessage & VbCrLf & "Software provided by Web Wiz Forums version " & strVersion & " -
http://www.webwizforums.com"
strEmailBodyAppendMessage = strEmailBodyAppendMessage & VbCrLf & "Free ASP Bulletin Board System - Download your free copy today!"
End If
End If
'******************************************
'*** Mail components ****
'******************************************
'Select which email component to use
Select Case strMailComponent
'******************************************
'*** MS CDOSYS mail component ****
'******************************************
'CDOSYS mail component
Case "CDOSYS"
response.write strMailComponent
'Dimension variables
Dim objCDOSYSCon
'Create the e-mail server object
Set objCDOSYSMail = Server.CreateObject("CDO.Message")
Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")
'Update the CDOSYS Configuration
Set objCDOSYSMail.Configuration = objCDOSYSCon
With objCDOSYSMail
'Who the e-mail is from
.From = strFromEmailName & " <" & strFromEmailAddress & ">"
'Who the e-mail is sent to
.To = strRecipientName & " <" & strRecipientEmailAddress & ">"
'The subject of the e-mail
.Subject = strSubject
'Set the e-mail body format (HTMLBody=HTML TextBody=Plain)
If blnHTML = True Then
.HTMLBody = strEmailBodyMessage & strEmailBodyAppendMessage
Else
.TextBody = strEmailBodyMessage & strEmailBodyAppendMessage
End If
'Send the e-mail
If NOT strOutgoingMailServer = "" Then .Send
End with
'Close the server mail object
Set objCDOSYSMail = Nothing
'******************************************
'*** MS CDONTS mail component ****
'******************************************
'CDONTS mail component
Case "CDONTS"
response.write strMailComponent
'Create the e-mail server object
Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
With objCDOMail
'Who the e-mail is from
.From = strFromEmailName & " <" & strFromEmailAddress & ">"
'Who the e-mail is sent to
.To = strRecipientName & " <" & strRecipientEmailAddress & ">"
'The subject of the e-mail
.Subject = strSubject
'The main body of the e-amil
.Body = strEmailBodyMessage & strEmailBodyAppendMessage
'Set the e-mail body format (0=HTML 1=Text)
If blnHTML = True Then
.BodyFormat = 0
Else
.BodyFormat = 1
End If
'Set the mail format (0=MIME 1=Text)
.MailFormat = 0
'Importance of the e-mail (0=Low, 1=Normal, 2=High)
.Importance = 1
'Send the e-mail
.Send
End With
'Close the server mail object
Set objCDOMail = Nothing