Connecting Tech Pros Worldwide Forums | Help | Site Map

Simple Email form

Newbie
 
Join Date: Aug 2008
Posts: 1
#1: Aug 26 '08
Hi,

I have been asked to add to some old ASP code , im more of a PHP/ASP.Net man so im a bit confused how to do this in ASP. all that is needed is an attachment section to the old form so that they can send pdf files to there customers. here is the orignal for code -

Expand|Select|Wrap|Line Numbers
  1. <!--#include file="../includes/config.asp"-->
  2. <!--#include file="../includes/security_inc.asp"-->
  3. <!--#include file="../includes/sConnString.asp" -->
  4. <html>
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  7. <title><%=sSiteTitle%></title>
  8. <script language="JavaScript" src="../includes/functions.js"></script>
  9. <link rel="stylesheet" href="../includes/stylesheet.css" type="text/css">
  10. </head>
  11. <body topmargin="0" leftmargin="0">
  12. <!--#include file="admin_header.asp" -->
  13. <!--#include file="admin_navigation.asp" -->
  14. <form method="post" action="sendemail.asp" onSubmit="return FormSendEmail_Validator(this);">
  15.       <div align="center">
  16.    <table width="80%" border="1" align="center" cellpadding="4" cellspacing="0" bordercolor="#6185C1" bgcolor="EEF3FB">
  17. <tr> 
  18. <td height="112" valign="top">
  19. <table width='100%' border="0" cellpadding="3">
  20. <tr>
  21.         <td colspan="3">* Required Field</td>
  22.       </tr>
  23.       <tr>
  24.         <td width="136">* From Email</td>
  25.         <td colspan="2"><input name="txtFrom" type="text" class="EmailAdminInput" value="<%=sAdministratorsEmail%>">
  26. This is the admin email set in config.asp          </td>
  27.       </tr>
  28.       <tr>
  29.         <td>* Subject</td>
  30.         <td colspan="2"><input type="text" name="txtSubject" class="input">
  31.       </td>
  32.       </tr>
  33.       <tr>
  34.         <td valign="top">* Body</td>
  35.         <td width="257" valign="top"><textarea  name="txtBody" class="textarea"></textarea>
  36.       </td>
  37.         <td width="276" valign="top">You can copy and paste a word document into the 'body' section
  38.       of the email. </td>
  39.       </tr>
  40.       <tr>
  41.         <td valign="top">Email Format</td>
  42.         <td colspan="2" valign="top"><select name="selFormat" id="selFormat">
  43.             <option value="HTML" selected>HTML</option>
  44.             <option value="TEXT">TEXT</option>
  45.           </select></td>
  46.       </tr>
  47.       <tr>
  48.         <td valign="top" style="height: 26px">Archive</td>
  49.         <td colspan="2" valign="top" style="height: 26px"><input name="cbArchive" type="checkbox" id="cbArchive" value="1"></td>
  50.         </tr>
  51.  
  52.       <tr>
  53.         <td colspan="3" valign="top">
  54.         <div align="center">
  55.           <input type="submit" value="Send Email" name="submit" class="submit">
  56.       </div></td>
  57.       </tr>
  58.     </table>  
  59.     </td>
  60.       </tr>
  61.     </table>  
  62. </div> 
  63.     </form><br><br>
  64.     <!--#include file="../includes/copyright.asp" -->
  65. </body>
  66. </html>
So if anyone can help that would be great
Thanks in advance

Regards
Gaz35

jhardman's Avatar
Moderator
 
Join Date: Jan 2007
Location: logan, utah
Posts: 2,690
#2: Aug 28 '08

re: Simple Email form


Unfortunately this functionality isn't built-in to classic ASP, and it is not a small job. Do they only need to send one file always (that would simplify things greatly), or do they need this to be more functional like a commercial webmail interface?

Jared
Reply


Similar ASP / Active Server Pages bytes