<% ' Option Explicit ' Dim strFriendEmail, strFriendName ' Const PREV_PAGE = "projects_rockrave_message3.html" Const NEXT_PAGE = "projects_rockrave_message2.html" ' strFriendEmail = Request.Form("FriendEmail") ' strFriendEmail = Request.Form("SenderEmail") ' strFriendEmail = Replace(strEmailAddress, "'", "''") ' strSenderEmail = Replace(strName, "'", "''") ' strSQLStmt = "INSERT INTO rockravemessage (FriendEmail, SenderEmail, TilmeldingsTidspunkt) VALUES ('" & FriendEmail & "', '" & SenderEmail & "', Now())" ' strDBPath = "C:\websites\datanom\database\log.mdb" ' Set objDBConn = Server.CreateObject("ADODB.Connection") ' objDBConn.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & strDBPath ' objDBConn.Execute strSQLStmt ' objDBConn.Close ' Set objDBConn = Nothing ' If Len(strFriendAddress) = 0 Or Len(strNameFriendName) = 0 Then ' Response.Redirect(PREV_PAGE) ' Response.End ' End If Set jmail = Server.CreateObject("JMail.Message") jmail.AddRecipient Request.Form("FriendEmail") jmail.From = Request.Form("SenderEmail") jmail.Subject = "Data Message #01-2003" jmail.Body = "A nice Mainpal Inv e-postcard if you can read HTML-mail." ' The return value of AddAttachment is used as a ' reference to the image in the HTMLBody. ' contentId = jmail.AddAttachment("C:\websites\datanom\wwwroot\pi\pi_le_bomb_gif_lille.gif") ' As only HTML formatted emails can contain inline images ' we use HTMLBody and appendHTML jmail.HTMLBody = "" jmail.appendHTML "
" jmail.appendHTML "DatanomMessageProvider[TM] " jmail.appendHTML "


" jmail.appendHTML "Hi
" & Request.Form("FriendName") & "

" jmail.appendHTML "Data message: " & Request.Form("Message") & "

Name of the sender: " & Request.Form("SenderName") & "
" jmail.appendHTML "Email address of the sender: " & Request.Form("SenderEmail") & "



" jmail.appendHTML "


" jmail.appendHTML "DATANOM.COM/MAINPAL" jmail.appendHTML "" jmail.appendHTML "<background SRC=""http://www.datanom.com/mainpal/message/mainpal.mp3"" AUTOSTART=""TRUE"" hidden=""false"" LOOP=""5""></embed>" jmail.appendHTML "</body></html>" ' But as not all mailreaders are capable of showing HTML emails ' we will also add a standard text body jmail.Body = "This is unfortunately a HTML-mail send by " & Request.Form("SenderName") & " from the www.datanom.com/mainpal website." jmail.appendText "There was a personal message for you: " & Request.Form("Message") & "." jmail.appendText "Mail address of the: " & Request.Form("SenderEmail") & "." jmail.Send( "mail.tele.dk" ) Response.Redirect(NEXT_PAGE) Response.End Set JMail.Message = Nothing %>