: ASP




Send Email using SmartMail

July 18th, 2008 admin Posted in ASP Comments Off


<%
On error resume next

Dim mySmartMail
Set mySmartMail = Server.CreateObject("aspSmartMail.SmartMail")
mySmartMail.Server = "mail.pakreal.com"
mySmartMail.SenderName = "Your Name"
mySmartMail.SenderAddress = "youremail@yourdomain.com"
mySmartMail.Recipients.Add "muneebsa@yahoo.com", "Muneeb Ahmad"
mySmartMail.Subject = "aspSmartMail Sample 1"
mySmartMail.Body = "This mail has been sent with aspSmartMail."
mySmartMail.SendMail
if Err.Number<>0 then
	Response.write "Error: " & Err.description
else
	Response.write "An e-mail has just been sent to " & mySmartMail.Recipients.Item(1).Name & "."
end if
%>
AddThis Social Bookmark Button

Send Mail using JMail

July 18th, 2008 admin Posted in ASP Comments Off


<%
Dim objJMail
Dim bSuccess
Dim Recipient
set objJMail = Server.CreateObject("JMail.SMTPMail")
objJMail.Silent = True
objJMail.ServerAddress = "mail.justformspdf.com"
objJMail.ContentType = "text/plain"
objJMail.Sender = "muneebsa@yahoo.com"
Recipient = "muneebsa@yahoo.com"
objJMail.AddRecipient(Recipient)
objJMail.Priority = 3
objJMail.Subject =  "JMail Test"
objJMail.Body = "JMail is perfect"
bSuccess = objJMail.Execute()
If bSuccess = False Then
	Response.Write "An error occurred, the email was not sent." + objJMail.ErrorMessage
Else
	Response.Write "Your message has been sent."
End If
objJMail.Close()
Set objJMail = Nothing
%>
AddThis Social Bookmark Button

Display Files in a Folder

July 18th, 2008 admin Posted in ASP Comments Off

<%@ LANGUAGE="VBSCRIPT" %>
<html>
<head>
<title></title>
<meta NAME="Author" CONTENT="FBRM Development Team">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link REL="stylesheet" HREF="../css/bizapp.css">
<link rel="stylesheet" href="css/fbm_tablesar.css">
</head>
<body BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#800080" TEXT="#000000" TOPMARGIN="0" LEFTMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0" background="./images/tanbg.gif">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
    <td width="142" valign="top" align="left">

    </td>
    <td>
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr>
			<td width="100%">
				<BR><BR>
				<font class="fbm-header01">Document List</font><br>
				<hr NOSHADE>

					<%
					Dim objFSO
					Dim objFolder
					Dim strPath

					strPath = "./lag_files/"
					Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
					Set objFolder = objFSO.GetFolder(Server.MapPath(strPath))

					'For Each objItem In objFolder.SubFolders
					For Each objItem In objFolder.Files

						If InStr(1, objItem, "_vti", 1) = 0 Then
					%>
							<BR>
					<%
						End If
					Next
					%>
			</td>
		</tr>
		</table>
	</td>
<tr valign="top">
      
</tr>
</table>
</body>
</html>
AddThis Social Bookmark Button

Read File Contents

July 18th, 2008 admin Posted in ASP Comments Off


<%@ Language=JavaScript %>

<%
var path = Server.MapPath("file_list_test_3.asp");
var fileSystem = Server.CreateObject("Scripting.FileSystemObject");
var file = fileSystem.OpenTextFile(path);
while (!file.AtEndOfStream) {
Response.Write(Server.HTMLEncode(file.ReadLine()) + "<br>");
}
file.Close();
file = null;
fileSystem = null;

%>
AddThis Social Bookmark Button

Server Variables

July 18th, 2008 admin Posted in ASP Comments Off

<%@ Language=JavaScript %>

<%
PATH_INFO = Request.ServerVariables("PATH_INFO");
LOGON_USER =Request.ServerVariables("LOGON_USER");
REMOTE_ADDR =Request.ServerVariables("REMOTE_ADDR");
LOCAL_ADDR = Request.ServerVariables("LOCAL_ADDR");
REMOTE_HOST =Request.ServerVariables("REMOTE_HOST");
REMOTE_USER =Request.ServerVariables("REMOTE_USER");
REQUEST_METHOD =Request.ServerVariables("REQUEST_METHOD");
SERVER_NAME =Request.ServerVariables("SERVER_NAME");
SERVER_PORT =Request.ServerVariables("SERVER_PORT");
SERVER_PROTOCOL =Request.ServerVariables("SERVER_PROTOCOL");
SERVER_SOFTWARE =Request.ServerVariables("SERVER_SOFTWARE");
URL = Request.ServerVariables("URL");

AUTH_TYPE = Request.ServerVariables("AUTH_TYPE");
AUTH_USER = Request.ServerVariables("AUTH_USER");
AUTH_PASSWORD = Request.ServerVariables("AUTH_PASSWORD");
HTTP_REFERER = Request.ServerVariables("HTTP_REFERER");
HTTP_USER_AGENT = Request.ServerVariables("HTTP_USER_AGENT");
HTTPS = Request.ServerVariables("HTTPS");
CERT_COOKIE = Request.ServerVariables("CERT_COOKIE");

Response.Write("<brServer Variables");
Response.Write("<br>PATH_INFO = " + PATH_INFO);
Response.Write("<br>LOGON_USER = " + LOGON_USER);
Response.Write("<br>REMOTE_ADDR = " + REMOTE_ADDR);
Response.Write("<br>LOCAL_ADDR = " + LOCAL_ADDR);
Response.Write("<br>REMOTE_HOST = " + REMOTE_HOST);
Response.Write("<br>REMOTE_USER = " + REMOTE_USER);
Response.Write("<br>REQUEST_METHOD = " + REQUEST_METHOD);
Response.Write("<br>SERVER_NAME = " + SERVER_NAME);
Response.Write("<br>SERVER_PORT = " + SERVER_PORT);
Response.Write("<br>SERVER_PROTOCOL = " + SERVER_PROTOCOL);
Response.Write("<br>SERVER_SOFTWARE = " + SERVER_SOFTWARE);
Response.Write("<br>URL = " + URL);

Response.Write("<br>AUTH_TYPE = " + AUTH_TYPE);
Response.Write("<br>AUTH_USER = " + AUTH_USER);
Response.Write("<br>AUTH_PASSWORD = " + AUTH_PASSWORD);
Response.Write("<br>HTTP_REFERER = " + HTTP_REFERER);
Response.Write("<br>HTTP_USER_AGENT = " + HTTP_USER_AGENT);
Response.Write("<br>HTTPS = " + HTTPS);
Response.Write("<br>CERT_COOKIE = " + CERT_COOKIE);						

%>
AddThis Social Bookmark Button

Similar Posts