473,791 Members | 2,985 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP form code - Bcc and signature file

114 New Member
Please could someone help me with this code? The problem appears to be a simple one, but i'm not html or ASP literate and need to modify the below code to add 2 things.

First a bit about the website: It's a news website, which has talkback, where the public register to post comments. One of the options in the comments is for the commentator to leave an email icon, if they want private emails from other readers. The initial email is sent through a form, When someone clicks a link they are taken to this form below, which is a form on a commenting website, where they can send a blind email to the commentator.

Blind email means that they are sending an email to the person's username, and at the same time their own email which will be shown to whomever gets the email. The form's "Name" is where the email will be sent, and the "Name" field has the email in the database, only the "Name" is shown in public (which is the username)

The form has a Name, Subject and Comment section, which they fill in, and then once clicked, the email is sent.


I want to add the following 2 things

1. I want a blind carbon copy of the email sent to "admin@myweb.co m" . I have tried the bcc. but can't get it right, don't know where to put it.

2. I also want to add a signature at the bottom of the email, so that it shows it came from my website. Something simple like a few lines of

"You are receiving this email from the talkback at mywebsite.com. It is a response to your talkback message. Thank you for using our talkback"

Could someone tell me what to include and where exactly? I am not familiar with html or ASP. Thank you in advance.


<!--#include file="inc_api.a sp"-->
<!--#include file="config.as p"-->


<% Dim ID, RS, SQL, NAME, EMAIL, COMMENT, sDATE, IO, M_ID, SUBJECT, CITY, COUNTRY, ALLOW_E, AID, NEXT_ID, C_NAME, C_EMAIL, MESSAGE, _
blDONE, blLOGGED_IN

ID = Trim(Request.Qu eryString("ID") )
AID = Trim(Request.Qu eryString("AID" ))
IF IS_VALID_ID(ID) = False OR IS_VALID_ID(AID ) = False THEN Response.END
MODE = Request.Form("m ode")

IF Trim(Session("P MMS_IN")) = "True" THEN blLOGGED_IN = True

IF MODE = "send" THEN

NAME = Request.Form("n ame")
EMAIL = Request.Form("e mail")
CONTENT = Request.Form("c ontent")




Call GET_DETAILS()

IF NAME = "" OR IsNull(NAME) THEN MESSAGE = MESSAGE & "<li />Please enter your name.<br />"
IF EMAIL = "" OR IsNull(EMAIL) THEN MESSAGE = MESSAGE & "<li />Please enter your email address.<br />"
IF CONTENT = "" OR IsNull(CONTENT) THEN MESSAGE = MESSAGE & "<li />Please enter your message.<br />"

IF MESSAGE = "" THEN

Call SEND_EMAIL_OUT( CONTENT, "RE:" & SUBJECT, C_EMAIL, EMAIL, "smtp.mywebsite .com")

blDONE = True

'Response.Redir ect "_comment_view. asp?ID=" & ID & "&AID=" & AID
'Response.END

END IF


ELSE

Call GET_DETAILS()
NAME = Session("PMMS_N AME")
EMAIL = Session("PMMS_E MAIL")

END IF



SUB GET_DETAILS()
SQL = "SELECT fldNAME, fldEMAIL, fldCOMMENT, fldDATE, fldIP, fldM_ID, fldSUBJECT, fldCITY, fldCOUNTRY, fldALLOW FROM nm_tbl_comment WHERE ID = " & ID
Call OPEN_DB()

Set RS = Server.CreateOb ject("ADODB.Rec ordset")
RS.LockType = 1
RS.CursorType = 0
RS.Open SQL, MyConn
IF NOT RS.EOF THEN
C_NAME = trim(RS("fldNAM E"))
C_EMAIL = trim(RS("fldEMA IL"))
SUBJECT = trim(RS("fldSUB JECT"))
ALLOW_E = trim(RS("fldALL OW"))

END IF
RS.Close
Set RS = Nothing

MyConn.Close
Set MyConn = Nothing
END SUB




%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<link rel="STYLESHEET " type="text/css" href="styles.cs s">
<link href="styles.cs s" rel="stylesheet " type="text/css">
</head><body bgcolor="#fffff f">


<%IF blDONE = True THEN%>
<br />
<table width="95%" align="center" cellpadding="2" cellspacing="0" border="0"><tr>
<td>
Thank you. Your email has been sent.<br />

</td>
</tr></table>
<br />
<!--#include file="inc_foote r1Close.asp"-->
</body></html>
<%Response.END% >
<%END IF%>

<%IF NOT MESSAGE = "" THEN%>
<table width="95%" align="center" cellpadding="2" cellspacing="0" border="0"><tr>
<td><%=MESSAGE% ></td>
</tr></table>
<br />
<%END IF%>

<form action="?ID=<%= ID%>&AID=<%=AID %>" method="post">
<table cellpadding="2" cellspacing="0" border="0" width="95%" align="center"> <tr>
<td colspan="2">Sen d email to: <span style="color:#d d4800;"><strong ><%=C_NAME%></strong></span>; </td>
</tr><tr>
<td>Your Name:</td>
<td><input style="width: 400px;" type="Text" name="name" value="<%=NAME% >" maxlength="180" class="textbox" /></td>
</tr><tr>
<td>Your Email:</td>
<td><input style="width: 400px;" type="Text" name="email" value="<%=EMAIL %>" maxlength="180" class="textbox" /></td>
</tr><tr>
<td colspan="2"><te xtarea class="textbox" rows="10" name="content" style="width: 100%;"><%=CONTE NT%></textarea></td>
</tr><tr>
<td colspan="2"><br /><input type="Submit" value="Send Email" /></td>
</tr></table>

<input type="Hidden" name="mode" value="send" />



</form>
Mar 29 '07 #1
0 1423

Sign in to post your reply or Sign up for a free account.

Similar topics

8
4420
by: Beowulf | last post by:
Hi Guru's, I have a query regarding using PHP to maintain a user profiles list. I want to be able to have a form where users can fill in their profile info (Name, hobbies etc) and attach an image, which will upload the record to a mySql db so users can then either view all profiles or query.. I.e. show all males in UK, all femails over 35 etc. Now, I'm not asking for How to do this but more what would be the best way? I've looked at...
4
6757
by: Tim218 | last post by:
Hi Everyone This is my first day with PHP and, not surprisingly, I've run into a problem :-) I want to allow file uploads to the server without exposing the non-technical end-users to FTP settings, file naming protocols, etc. I've found the following from http://www.zend.com/manual/features.file-upload.php ....
2
2957
by: Jeremy | last post by:
Hello, I am trying to validate a form wherein someone will enter their first and last name, fill out the form, then electronically "sign" at the bottom. I want to confirm that the first and last names match in the First & Last & Signature form fields. Here is the code I wrote, but it doesn't work because indexof is supposed to be a string. What do I need to do to fix this? if (document.repForm.Signature.value.indexOf(First) == -1 ||
4
10349
by: MVM | last post by:
Hi everyone, I am working on an Access project (ADP). I have a switchboard form setup to allow the user to open up another form by entering search criteria in a text box and clicking a command button. Then the form opens using input parameters and grabbing the data in the switchboard text box. My question is this, how do I grab the data from the switchboard form and put a wildcard on both ends of the data when passed to the input...
4
19814
by: intl04 | last post by:
How do I create a data input form in Access that is external to the Access database to which it's connected (if that's possible, which I believe it is)? For example, if someone clicks on an Access file icon on a computer desktop, it will open up a data entry form (that was created in Access). That way, the people who enter the data won't have direct access to the database at any point. I've seen that this can be done, but I don't know...
4
4042
by: William Wisnieski | last post by:
Hello Everyone, Access 2000 I have a form with multiple pages on it. There is one text field on the third page of the form that I need the user to complete before leaving the form or moving to the next record. So, in the BeforeUpdate event of the form itself I have the following code:
5
2464
by: Simon Harris | last post by:
Hi All, I am trying to call a method in a web form, from an event fired in a user control. My user control displays a map, which has a link button to enlarge/shrink the map. When the user enlarges the map, I want to hide my navigation table etc, maximising the viewing area. I've been working on this for 5 hours now, so far I have as detailed below - Which rund with out error, but the final function never gets called. Any help/suggestions...
1
1763
by: tomg | last post by:
How can I get all of my MS Access form names into an Excel file? thanks,
4
14402
NeoPa
by: NeoPa | last post by:
Introduction: Macro Security Levels in MS Office applications are recommended to be set to High. This stops any VBA code associated with a project from running, unless it is signed (with a certificate). A trusted signature will allow the code to run normally, whereas an un-trusted one will prompt the user either to trust the issuing CA (Certificate Authority) and enable the code, or simply to disable the code. This is all very well, but...
0
9669
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10427
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10207
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10155
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9995
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9029
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5431
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5559
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.