PDA

View Full Version : Replying a Email (New Request, please ignore the old request)


victoria_1018
09-26-2002, 04:49 AM
Hi all,
I am currently doing a program related to sending of emails. The program goes like this.
There are 10 members in Team A. When a any of the member sends a quotation form to the sales department, on submit, the information of the quotation will reach the sales teams through email using a default email account (nobody@abc.com), and at the same time, a copy of the quotation will be sent back to team A (teamA@abc.com), as the email account (nobody@abc.com) consist of Team A, the sales department and the manager.

Here is the sample of how the quotation looks like.

Submitted By: Mary Lee (marylee@abc.com)
Date of Submission: 09/26/02
Customer¡¦s Company: XYZ Trading
Contact Person: Miss Tina

My question is instead of sending the quotation back to teamA@abc.com, can I have it send to the person who submit the quotation, the sales department and the manager?
In the example, the quotation will be sent to marylee@abc.com, sales department and the manager.


Thanks
Regards
Victoria

aCcodeMonkey
09-26-2002, 05:43 AM
Victoria,

One way to do this is to add CC/BCC querystring to the email form's action statement.

Take a look at my replay to thread: How can I CC a user who fills out a form? (http://www.codingforums.com/showthread.php?s=&threadid=6817)

Another method, if you are using CDONTS, would be to add the desired adresses to the obj.Cc or obj.Bcc parameters
Rememeber each recipient's email address is separated by semicolons ";"

Example:
"address1@test.com;address2@test.com;address3@test.com"

CDONTS Code

<%
sub SendEmail()
dim oCDO
dim sSentBy
dim sRetunAddress
dim sSubjectText
dim sMsgBody
dim sBCC

' Create CDONTS object
Set oCDO = Server.CreateObject("CDONTS.NewMail")

' Assign posted form variables sBcc = "address1@test.com;address2@test.com;address3@test.com"
sSentBy = Request.Form("Fname") & " " & Request.Form("Lname")
sRetunAddress = Request.Form("txtEmailAddressl")
sSubjectText = Request.Form("txtSubject")
sMsgBody = Request.Form("txtQuote")

' Bind variables to parameters
with oCDO
.From = sRetunAddress
.To = "myEmail@text.com"
.Cc = sRetunAddress
.bCC = sBCC
.Subject = sSubjectText
.Body = sMsgBody
.MailFormat = 0 ' Set mail format to CdoMailFormatMime
end with

'Send Mail Message to server
oCDO.Send
end sub
%>


Hope this helps :cool:

Dale Mitchell (acodemonkey@hotmail.com)
MindCrafter Web Designs (http://members.aol.com/mndcrftr)

victoria_1018
09-26-2002, 06:18 AM
Dear Dale Mitchell,
Thanks, I will try it out
Regards
Victoria