HTML email solution
There is a sample layout below of how the email should be formatted. simply add HTML using the below format.
Images can be used but make sure you use the full address and not just /includes/images/
[/i]
Edit : /commonfunctions.asp
Change : myMail.TextBody= message
To : myMail.HTMLBody= message
Edit : /dbcommon.asp
Add Relevant Details to :
- cFrom
- cSmtpServer
- cSmtpPort
- cSMTPUser
- cSMTPPassword
Add to : /includes/_events.asp then change the blue fields and edit HTML as you required
**
<%
Sub AfterEdit()
'**** Send HTML email ****
sqlQuery = "SELECT [color="#0000ff"]* From = "&GetRequestForm("editid1")
Set sqlRecord = dbConnection.Execute(sqlQuery)
If Not sqlRecord.EOF Then
email = ""&sqlRecord("[color="#0000ff"]field name holding email address")&", ")
subject = "Hello "&sqlRecord("[color="#0000ff"]field1")&" (some more text : "&sqlRecord("")&")"
message = "<body bgcolor=""#E4E4E4"">&vbCrLf &
" <table style=""border-collapse: collapse"" cellpadding=""3"" width=""85%"" id=""Main"" align=""center"">" &vbCrLf &
" <tr>" &vbCrLf &
" <td bgcolor=""#77AFF1"">some text "&sqlRecord("[color=#0000ff]field")&"</td>" &vbCrLf &
" </tr>" &vbCrLf &
" <tr>" &vbCrLf &
" <td bgcolor=""#FFFFFF"" style=""border-left: 1px outset #000000; border-right: 1px outset #000000;"">some text</td>" &vbCrLf &
" </tr>" &vbCrLf &
" <tr>" &vbCrLf &
" <td bgcolor=""#FFFFFF"" align=""center""style="" border-left: 1px outset #000000; border-right: 1px outset #000000;"">more text</td>" &vbCrLf &
" </tr>" &vbCrLf &
" <tr>" &vbCrLf &
" <td bgcolor=""#4A4A4A"" align=""left"" width=""100%"" style=""border-left: 1px outset #000000"">more text</td>" &vbCrLf &
" </tr>" &vbCrLf &
" </table></body>"
End If
sqlRecord.Close
Set sqlRecord= Nothing
sendmail email, subject, message
'** Redirect to another page ****
Response.Redirect "/youremailwassentconfirmation.asp"
End Sub
%>