⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 email_messenger.asp

📁 简单的asp论坛源码系统,很适用于初学者!界面简洁,功能齐全
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<% @ Language=VBScript %>
<% Option Explicit %>
<!--#include file="common.asp" -->
<!--#include file="functions/functions_send_mail.asp" -->
<%
'****************************************************************************************
'**  Copyright Notice    
'**
'**  Web Wiz Forums(TM)
'**  http://www.webwizforums.com
'**                            
'**  Copyright (C)2001-2008 Web Wiz(TM). All Rights Reserved.
'**  
'**  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS UNDER LICENSE FROM 'WEB WIZ'.
'**  
'**  IF YOU DO NOT AGREE TO THE LICENSE AGREEMENT THEN 'WEB WIZ' IS UNWILLING TO LICENSE 
'**  THE SOFTWARE TO YOU, AND YOU SHOULD DESTROY ALL COPIES YOU HOLD OF 'WEB WIZ' SOFTWARE
'**  AND DERIVATIVE WORKS IMMEDIATELY.
'**  
'**  If you have not received a copy of the license with this work then a copy of the latest
'**  license contract can be found at:-
'**
'**  http://www.webwizguide.com/license
'**
'**  For more information about this software and for licensing information please contact
'**  'Web Wiz' at the address and website below:-
'**
'**  Web Wiz, Unit 10E, Dawkins Road Industrial Estate, Poole, Dorset, BH15 4JD, England
'**  http://www.webwizguide.com
'**
'**  Removal or modification of this copyright notice will violate the license contract.
'**
'****************************************************************************************



'*************************** SOFTWARE AND CODE MODIFICATIONS **************************** 
'**
'** MODIFICATION OF THE FREE EDITIONS OF THIS SOFTWARE IS A VIOLATION OF THE LICENSE  
'** AGREEMENT AND IS STRICTLY PROHIBITED
'**
'** If you wish to modify any part of this software a license must be purchased
'**
'****************************************************************************************





'Set the response buffer to true as we maybe redirecting
Response.Buffer = True


'Dimension variables
Dim lngToUserID		'Holds the user ID of who the email is to
Dim strToUser		'Holds the user name of the person the email is to
Dim blnShowEmail	'set to true if the user allws emailing to them
Dim strToEmail		'Holds the email address of who the email is to
Dim strFromEmail	'Holds the email address of who the email is from
Dim blnEmailSent	'Set to true if the email has been sent
Dim strEmailBody
Dim strSubject
Dim strUsername
Dim strPassword
Dim strWebFormID


'Get who the email is to
lngToUserID = CLng(Request("SEID"))

'If there is no recopinet for the email then send em to homepage
If Request("SEID") = "" OR blnEmailMessenger = False Then
	Call closeDatabase()

	Response.Redirect("default.asp" & strQsSID1)
End If


'If the user is user is using a banned IP redirect to an error page
If bannedIP() Then
	
	'Clean up
	Call closeDatabase()
	
	'Redirect
	Response.Redirect("insufficient_permission.asp?M=IP" & strQsSID3)

End If


'Initlise variables
blnEmailSent = False

'Get the email address and name of the person the email is to be sent to

'Initalise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT " & strDbTable & "Author.Username, " & strDbTable & "Author.Author_email, " & strDbTable & "Author.Show_email " & _
"FROM " & strDbTable & "Author " & strDBNoLock & " " & _
"WHERE " & strDbTable & "Author.Author_ID = " & lngToUserID

'Query the database
rsCommon.Open strSQL, adoCon

'Read in the details from the user
If NOT rsCommon.EOF Then

	strToUser = rsCommon("Username")
	strToEmail = rsCommon("Author_email")
	blnShowEmail = CBool(rsCommon("Show_email"))
End If

'Clean up
rsCommon.Close


'Get the email of who the email is from
'Initalise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT " & strDbTable & "Author.Author_email " & _
"FROM " & strDbTable & "Author " & strDBNoLock & " " & _
"WHERE " & strDbTable & "Author.Author_ID = " & lngLoggedInUserID

'Query the database
rsCommon.Open strSQL, adoCon

'Read in the details from the user
If NOT rsCommon.EOF Then

	strFromEmail = rsCommon("Author_email")
End If

'Clean up
rsCommon.Close


'If this is a post back send the mail
If Request.Form("postBack") Then
	
	'Check the session ID to stop spammers using the email form
	Call checkFormID(Request.Form("formID"))
	Call saveSessionItem("formID", "")

	'Initilalse the body of the email message
	strEmailBody = strTxtHi & " " & strToUser & "," & _
	vbCrLf & vbCrLf & strTxtTheFollowingEmailHasBeenSentToYouBy & " " & strLoggedInUsername & " " & strTxtFromYourAccountOnThe & " " & strMainForumName & "." & _
	vbCrLf & vbCrLf & strTxtIfThisMessageIsAbusive & ": - " & _
	vbCrLf & vbCrLf & strForumEmailAddress & _
	vbCrLf & vbCrLf & strTxtIncludeThisEmailAndTheFollowing & ": - " & "BBS=" & strMainForumName & ";ID=" & lngLoggedInUserID & ";USR= " & strLoggedInUsername & ";" & _
	vbCrLf & vbCrLf & strTxtReplyToEmailSetTo & " " & strLoggedInUsername & "." & _
	vbCrLf & vbCrLf & strTxtMessageSent & ": -" & _
	vbCrLf & "---------------------------------------------------------------------------------------" & _
	vbCrLf & vbCrLf & Request.Form("message")

	'Inititlaise the subject of the e-mail
	strSubject = Request.Form("subject")

	'Send the e-mail using the Send Mail function created on the send_mail_function.inc file
	blnEmailSent = SendMail(strEmailBody, strToUser, decodeString(strToEmail), strLoggedInUsername, decodeString(strFromEmail), strSubject, strMailComponent, false)

	'If the user wants a copy of the email as well send em one
	If Request.Form("mySelf") Then
		Call SendMail(strEmailBody, strLoggedInUsername, decodeString(strFromEmail), strLoggedInUsername, decodeString(strFromEmail), strSubject, strMailComponent, false)
	End If

End If


'If active users is enabled update the active users application array
If blnActiveUsers Then
	'Call active users function
	saryActiveUsers = activeUsers(strTxtEmailMessenger, "", "", 0)
End If




'Create a form ID
strWebFormID = LCase(hexValue(10))

'Place formID into app session
Call saveSessionItem("formID", strWebFormID)


'Set bread crumb trail
strBreadCrumbTrail = strBreadCrumbTrail & strNavSpacer & strTxtEmailMessenger

%>
<!-- #include file="includes/browser_page_encoding_inc.asp" -->
<title><% = strTxtEmailMessenger %></title>
<meta name="generator" content="Web Wiz Forums" />

<%
'***** START WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ******
Response.Write("<!--//" & _
vbCrLf & "/* *******************************************************" & _
vbCrLf & "Software: Web Wiz Forums(TM) ver. " & strVersion & "" & _
vbCrLf & "Info: http://www.webwizforums.com" & _
vbCrLf & "Copyright: (C)2001-2008 Web Wiz(TM). All rights reserved" & _
vbCrLf & "******************************************************* */" & _
vbCrLf & "//-->")
'***** END WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ******
%>

<script language="JavaScript">

//Function to check form is filled in correctly before submitting
function CheckForm () {

	var errorMsg = "";

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -