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/SendHtmlEmail.asp
<%@ Language=VBScript %>
<%
'*********************************************************************************
'Copyright Dundas Software Ltd. 2000. All Rights Reserved.
'
'PURPOSE:           The user can send an html-based email to the specified
'					 recipients, and optionally specify a background audio file
'					 as well as a background picture for the email. 
'
'POST DESTINATION:  SendHtmlEmail_Process.asp.           
'
'INPUT:				SMTP server (optional), TO recipients, CC recipients, BCC              
'					 recipients, From address, Subject of the message, the message
'					 body, optional background audio file and optional background
'					 image for the html-based email.
'
'COMMENTS:          Maximum amount of posted data is 1 Meg.
'					A success message is displayed if the email is successfully
'					 sent.					
'
'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>
<img align="right" border="0" src="images/dundaslogo.gif" hspace="5" WIDTH="160" HEIGHT="18">
<img border="0" src="images/headline.gif" WIDTH="390" HEIGHT="50">
<form action="SendHtmlEmail_Process.asp" name="frmSendMail" method="post" ENCTYPE="multipart/form-data">
<div align="center">
<center>
<%
Dim temp(5)  'used to populate form elements with values returned from SendHtmlEmail_Upload.asp
'check to see if an email was sent previously, if so output success message
If Request.QueryString("Success") = "TRUE" Then
	Response.Write "<br><center><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 element 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	
%> 
<br>
<table border="0" bgcolor="#CCCCCC">
<tr>
    <td width="687" bgcolor="#CCCCCC" colspan="2" bordercolor="#000000" nowrap>&nbsp;
		<img border="0" src="images/headlinetransparent3.gif" WIDTH="504" HEIGHT="28">
	</td>
</tr>
<tr>
    <td width="687" bgcolor="#CCCCCC" colspan="2" bordercolor="#000000" align="center" nowrap>
      <p align="center"><font face="Arial"><b>
      SMTP Relay Server:</b></font>  <input name="txtSMTP" size="18" 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="687" bgcolor="#CCCCCC" colspan="2" bordercolor="#000000" align="center" nowrap>
		<hr align="center" color="#0000FF" size="1">
	</td>
</tr>
 </center>
<tr>
	<td bgcolor="#CCCCCC" height="27" align="right" width="170" nowrap>
      <p align="right"><b>From:</b></p>
	</td>
    <td width="511" bgcolor="#CCCCCC" height="27" align="left" nowrap> 
      <p align="left"> <input name="txtFrom" size="50" tabindex="2" value="<%=temp(1)%>">&nbsp;
      </p>
    </td>
</tr>
<center>
<tr>
	<td bgcolor="#CCCCCC" height="27" align="right" width="170" nowrap>
		<b>To:</b>
	</td>
</center>
	<td width="511" bgcolor="#CCCCCC" height="27" align="left" nowrap>
      <p align="left"><input name="txtTo" size="50" tabindex="3" value="<%=temp(2)%>">&nbsp;
      <font color="red">*</font>
      </p>
	</td>
</tr>
    <center>
<tr>
	<td bgcolor="#CCCCCC" height="27" align="right" width="170" nowrap>
		<b>Cc:</b>
	</td>
    <td width="511" bgcolor="#CCCCCC" height="27" align="left" nowrap>
		<input name="txtCc" size="50" tabindex="4" value="<%=temp(3)%>">
	</td>
</tr>
<tr>
	<td bgcolor="#CCCCCC" height="27" align="right" width="170" nowrap>
		<b>Bcc:</b>
	</td>
    <td width="511" bgcolor="#CCCCCC" height="27" align="left" nowrap>
		<input name="txtBcc" size="50" tabindex="5" value="<%=temp(4)%>">
	</td>
</tr>
<tr>
	<td bgcolor="#CCCCCC" height="25" align="right" width="170" nowrap>
		<b>Subject:</b>
	</td>
    <td width="511" bgcolor="#CCCCCC" height="25" align="left" nowrap>
		<input name="txtSubject" size="50" tabindex="6" value="<%=temp(5)%>">
	</td>
</tr>
</center>
<tr>
    <td bgcolor="#CCCCCC" align="right" width="170" nowrap>
      <b><font size="3">Background Picture:</font></b>
    </td>
    <td bgcolor="#CCCCCC" width="511" align="left" nowrap>
      <input type="file" name="txtBGPicture" size="50" tabindex="7">
    </td>
</tr>
<tr>
	<td bgcolor="#CCCCCC" align="right" width="170" nowrap>
      <b><font size="3">Background Sound:&nbsp;</font></b>
    </td>
    <td width="511" bgcolor="#CCCCCC" align="left" nowrap>
		<input type="file" name="txtBGSound" size="50" tabindex="8">
	</td>
</tr>
  <center>
<tr>
	<td width="687" bgcolor="#CCCCCC" colspan="2" align="center" nowrap>
      <p align="center">
      <textarea cols="105" name="txtBody" rows="3" style="height: 150; width: 687" tabindex="9"></textarea>
    </td>
  </tr>
</table>
</center>
</div>
<p align="center"><input type="submit" value="Submit" name="cmdSubmit">
<input type="reset" value="Reset" name="cmdReset"></p>
</form>
<p><font size="2"><img border="0" src="images/scenario.gif" align="absmiddle" WIDTH="82" HEIGHT="14">
</font></p>
<p><font size="2">This demo sends an html-based email to a specified destination address, letting you set 
various message headers like From, Subject,CC and BCC.&nbsp; You can also 
select a background image as well as a background sound for the email.</font></p>

<p><font size="2">We use this main page to retrieve email data and then post to an asp page (named SendHtmlMail_Upload.asp) which uses the upload and email controls
to handle the embedded objects 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"> HtmlEmbeddedObjs</font> collection is used to embed html objects into the body of the message.</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>
</ul>
<p>&nbsp;
</p>
</body>
</html>