HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/bin/dundas/FreeLibs/AspMail/Samples/SendMail.asp
<%@ Language=VBScript %>
<% Option Explicit	
Response.Buffer = True 'enable html buffering
'******************************************************************************
'Copyright Dundas Software Ltd. 2000. All Rights Reserved.
'
'PURPOSE:           The user can send a text-based email with an optional file 
'					 attachment to the specified recipient.
'
'POST DESTINATION:  SendMail_Process.asp.           
'
'INPUT:             TO address, From address, SMTP relay server (optional),
'					 CC and BCC recipients, Subject, message body and 
'					 optional file attachment, and SMTP relay server (optional).
'
'COMMENTS:          Maximum amount of posted data is 1 Meg.
'					A success message is displayed if the email was successfully
'					 sent, otherwise the user is redirected to an error page.					
'
'Dundas Software Contact Information:
'	Email:	sales@dundas.com
'   Phone:	(800) 463-1492
'			(416) 467-5100
'	Fax:	(416) 422-4801
'******************************************************************************
%>
<html>
<head>
<meta NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
</head>
<body color="black" bgcolor="white">
<table><tr><td><img border="0" src="images/clouds.jpg" WIDTH="550" HEIGHT="36"></td><tr></table>
<span style="position: absolute; left: 574; top: 20; z-index: -1">
<img align="right" border="0" src="images/dundaslogo.gif" hspace="5" WIDTH="160" HEIGHT="18">
</span>
&nbsp;
<img border="0" src="images/headline.gif" WIDTH="390" HEIGHT="50">
<%
'check to see if an email was successfully sent previously, if it 
'	was then display a short success message to the user.
'we also retrieve QueryString values (set by SendMail_Process.asp) so that
'   we can populate the form's input elements
Dim temp(5)     'this array is used to set Value attribute of form elements
If Request.QueryString("Success") = "TRUE" Then
	Response.Write "<center><br><font color=blue> The previous email was successfully sent to either the destination address or the SMTP relay server (if specified).</font></center>"
	'now grab the querystring parameter which stores the form's values
	Dim l
	For l = 1 To 6
		temp(l - 1) = Request.QueryString("Value" & l)
	Next
Else
'user loaded page for first time, so set temp array to zero-length string values
	For l = 0 To 5
		temp(l) = ""
	Next
End If	
%>
<form action="SendMail_Process.asp" name="frmSendMail" method="post" ENCTYPE="multipart/form-data">
<div align="center">
<center>
<table border="0" width="666" bgcolor="#CCCCCC" height="487">
  <tr>
    <td width="651" bgcolor="#CCCCCC" colspan="2" bordercolor="#000000" nowrap>&nbsp;
		<img border="0" src="images/headlinetransparent2.gif" WIDTH="389" HEIGHT="25">
    </td>
  </tr>
  <tr>
    <td width="651" bgcolor="#CCCCCC" colspan="2" bordercolor="#000000" nowrap>
      <p align="center"><font face="Arial"><b><br>
      SMTP Relay Server:</b></font> <input name="txtSMTP" size="34" tabindex="1" value="<%=temp(0)%>"><br>
      <i>(<font size="2">Optional.&nbsp; Using a relay server
      will improve the performance of the operation</font>.)</i>
    </td>
  </tr>
  <tr>
    <td width="651" bgcolor="#CCCCCC" colspan="2" bordercolor="#000000" nowrap>
      <hr align="center" color="#0000FF" size="1">
    </td>
  </tr>
  </center>
  <tr>
    <td bgcolor="#CCCCCC" height="27" align="right" nowrap>
      <p align="right"><font face="Arial"><b>From:</b></font></p>
    </td>
    <center>
    <td width="535" bgcolor="#CCCCCC" height="27" nowrap>
		<input name="txtFrom" size="75" tabindex="2" value="<%=temp(1)%>">&nbsp;
	</td>
  </tr>
  <tr>
    <td bgcolor="#CCCCCC" height="27" align="right" nowrap>
		<font face="Arial"><b>To:</b></font>
	</td>
    <td width="535" bgcolor="#CCCCCC" height="27" nowrap>
		<input name="txtTo" size="75" tabindex="3" value="<%=temp(2)%>">&nbsp;
		<font color="red">*</font>
	</td>
  </tr>
  <tr>
    <td bgcolor="#CCCCCC" height="27" align="right" nowrap>
		<font face="Arial"><b>Cc:</b></font>
	</td>
    <td width="535" bgcolor="#CCCCCC" height="27" nowrap>
		<input name="txtCc" size="75" tabindex="4" value="<%=temp(3)%>">
	</td>
  </tr>
  <tr>
    <td bgcolor="#CCCCCC" height="27" align="right" nowrap>
		<font face="Arial"><b>Bcc:</b></font>
	</td>
    <td width="535" bgcolor="#CCCCCC" height="27" nowrap>
		<input name="txtBcc" size="75" tabindex="5" value="<%=temp(4)%>">
	</td>
  </tr>
  <tr>
    <td bgcolor="#CCCCCC" height="25" align="right" nowrap>
		<font face="Arial"><b>Subject:</b></font>
	</td>
    <td width="535" bgcolor="#CCCCCC" height="25" nowrap>
		<input name="txtSubject" size="75" tabindex="6" value="<%=temp(5)%>">
	</td>
  </tr>
  </center>
  <tr>
    <td bgcolor="#CCCCCC" nowrap>
      <p align="right"><font face="Arial"><b>Attachments:</b></font></p>
    </td>
    <center>
    <td width="535" bgcolor="#CCCCCC" nowrap>
		<input type="file" name="txtAttachment1" size="60" tabindex="7">
		<img border="0" src="images/Paperclip2.gif" WIDTH="7" HEIGHT="14">
	</td>
  </tr>
  </center><center>
  <tr>
    <td width="651" bgcolor="#CCCCCC" colspan="2" nowrap>
		<p align="center"><textarea cols="105" name="txtBody" rows="3" style="height: 205; width: 656" tabindex="8"></textarea>
	</td>
  </tr>
</table>
</center>
</div>
<p align="center"><input type="submit" value="Send" name="cmdSubmit">
<input type="reset" value="Reset" name="cmdReset"></p>
</form>
<p><img border="0" src="images/scenario.gif" align="absmiddle" WIDTH="82" HEIGHT="14">
</p>
<p><font size="2">This demo sends a text-based email to a specified destination address.  
This main page retrieves email data and then posts to SendMail_Process.asp which uses the Upload and Mailer controls
to handle the file attachment and send the email.  If the operation is successful you will be redirected back to this main page.  If it is not successful 
you will be redirected to an error page.</font>
<p><font size="2"><img border="0" src="images/features.gif" WIDTH="81" HEIGHT="14">
</font> 
<ul>
<li><font size="2">Optionally uses the <font color="blue">SMTPRelayServers</font> collection to specify SMTP relay 
servers.</font> 
<li><font size="2">The<font color="blue"> Attachments</font> collection is used to add an attachment to the message if you choose to do so.</font>  
<li><font size="2">Collections are used for the To, From, Cc, and Bcc fields.</font> 
<li><font size="2">Uses the <font color="blue">SendMail</font> method to send the email. This function 
  incorporates ALL of the control's functionality.</font>
</font>  
<li><font size="2">Utilizes the free Dundas Upload control.</font></li>     
</ul>
<p><font size="2"><i>Note: you can specify multiple addresses for the To, BCC and CC fields by separating the 
      addresses with commas.</i></font>
</p>
</body>
</html>