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

📄 functions_send_mail.asp

📁 Computer SHOP+DATABASE
💻 ASP
字号:
<%
//Function to send an e-mail
function SendMail(strEmailBodyMessage,strRecipientName, strRecipientEmailAddress, strFromEmailName, strFromEmailAddress, strSubject, blnHTML, strID)
{
	//Dimension variables
	var objCDOSYSMail;				//Holds the CDOSYS mail object
	var objCDOMail;					//Holds the CDONTS mail object
	var objJMail;					//Holds the Jmail object
	var objAspEmail;				//Holds the Persits AspEmail email object
	var objAspMail;					//Holds the Server Objects AspMail email object
	var strEmailBodyAppendMessage;	//Holds the appended email message
	var strRemove;
	var strMailSign;
	
	if(strID!="")
	{
		strRemove = "<br><br>____________________________________________________________________<br>";
		strRemove = strRemove + "If you don't want to receive this email in the future, please <a href='http://www.dthcomputer.com.vn/mailRemove.asp?id=" + strID + "'>click here</a>.<br><br>";
	}
	else
	{
		strRemove = "";
	}
	strEmailBodyAppendMessage = "<BR><BR>" + String(strMailSign) + strRemove

	//******************************************
	//***	        Mail components         ****
	//******************************************

			//Create the e-mail server object
				objCDOMail = Server.CreateObject("CDONTS.NewMail");

				//Who the e-mail is from
				objCDOMail.From = strFromEmailName + " <" + strFromEmailAddress + ">";

				//Who the e-mail is sent to
				objCDOMail.To = strRecipientName + " <" + strRecipientEmailAddress + ">";

				//The subject of the e-mail
				objCDOMail.Subject = strSubject;

				//The main body of the e-amil
				objCDOMail.Body = strEmailBodyMessage + strEmailBodyAppendMessage;

				//Set the e-mail body format (0=HTML 1=Text)
				if(blnHTML)
				{
					objCDOMail.BodyFormat = 0;
				}
				else
				{
					objCDOMail.BodyFormat = 1;
				}

				//Set the mail format (0=MIME 1=Text)
				objCDOMail.MailFormat = 0;

				//Importance of the e-mail (0=Low, 1=Normal, 2=High)
				objCDOMail.Importance = 1;

				//Send the e-mail
				objCDOMail.Send
}
%>

⌨️ 快捷键说明

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