View Full Version : 2 Email addresses in form properties- possible?
Jello
08-27-2002, 03:00 PM
Can I do this? Separate them by comma or semi colon or something? Please excuse my newbie-ness! (I also have a string going in the 'Experts' section about something similar.)
Thanks!
justjay
08-28-2002, 05:33 PM
Depends on whether the script you have handling your form has been designed to recognise this method and if so what punctuation is permissble...
PS those that read the Expert thread do read these as well...
The standard separator used between mail addresses is a
semi colin.... But the FrontPage form does not support it.
You will need to use CDONT's or something comparable to CDONT's to be able to achive it.
The following is my version of "SendMail.asp"
Save the followinf code as such...
Required fields are.
-- RCPT --- can be a hidden field, holds the recipients address.
-- Email --- can be a hidden field, hold the senders address
Optional fields are
-- subject -- can be a hidden field, holds the subject matter of the message
-- CarbonCopy -- Can be a hidden field, holds the address for carbon send.
-- Confirmation -- Can be a hidden field, holds the URL of your confirmation page.
If sending to multiple Email addresses or CarbonCopies... Seperate the addresses with a semi-colon
This file also assumes that the Reset button and Submit buttons
carry the names of "B1" and "B2"
<%@ LANGUAGE="VBSCRIPT" %>
<%
Function TrimForm( )
Dim line, ret
ret = ""
For Each item In Request.Form
If item = "RCPT" OR item = "B1" OR item = "B2" OR item = "CarbonCopy" Then
'Do Nothing
Else
line = "<B>" & item & ":" & "</B>" & " " & Request.Form(item) & "<BR>" & vbCrLf
End If
ret = ret & line
Next
TrimForm = ret
End Function
Dim MsgHead, Msg, MsgFoot, str, Conf
MsgHead = "<!DOCTYPE HTML PUBLIC ""-//IETF//DTD HTML//EN"">" & vbCrLf
MsgHead = MsgHead & "<html>" & vbCrLf
MsgHead = MsgHead & "<head>" & vbCrLf
MsgHead = MsgHead & "<meta http-equiv=""Content-Type""" & vbCrLf
MsgHead = MsgHead & "content=""text/html; charset=iso-8859-1"">" & vbCrLf
MsgHead = MsgHead & "<title>Sample NewMail</title>" & vbCrLf
MsgHead = MsgHead & "</head>" & vbCrLf
MsgHead = MsgHead & "<body>" & vbCrLf
Msg = TrimForm() 'Request.Form
MsgFoot = & "<BR></body></html>"
str = MsgHead & Msg & MsgFoot
Set myMail = CreateObject("CDONTS.NewMail")
myMail.From = Request.Form("Email")
myMail.To = Request.Form("RCPT") ' Required Hidden Field for Recipient
myMail.Cc = Request.Form("CarbonCopy") ' Optional Hidden Field for CarbonCopy Recipient
myMail.Subject = Request.Form("subject") ' Optional Hidden Field for Subject
myMail.BodyFormat = 0 '0=Hypertext Markup Language (HTML). 1=plain text (default value).
myMail.MailFormat = 0 '0=MIME format. 1=uninterrupted plain text (default value).
myMail.Body = str
myMail.Send
Set myMail = Nothing
If IsEmpty(Request.Form("Confirmation")) Then
Conf = "<html>" & vbCrLf
Conf = Conf & "<head>" & vbCrLf
Conf = Conf & "<meta name="""GENERATOR""" content="""Microsoft FrontPage 5.0""">" & vbCrLf
Conf = Conf & "<title>Form Confirmation</title>" & vbCrLf
Conf = Conf & "</head>" & vbCrLf
Conf = Conf & "<body>" & vbCrLf
Conf = Conf & "<p> </p>" & vbCrLf
Conf = Conf & "<h3>Your Message has been Sent</h3>" & vbCrLf
Conf = Conf & "<p> </p>" & vbCrLf
Conf = Conf & "<h3 align="""center""">"
Conf = Conf & "Subject: " & Request.Form("subject") & "</h3>" & vbCrLf
Conf = Conf & "<h3 align="""center""">"
Conf = Conf & "Date " & Date & "</h3>" & vbCrLf
Conf = Conf & "<p>" & TrimForm( ) & "</p>" & vbCrLf
Conf = Conf & "<h3 align="""center""">Click the"
Conf = Conf & "Back Button to Return to the previous Page</h3><BR>" & vbCrLf
Conf = Conf & "</body>" & vbCrLf
Conf = Conf & "</html>"
%>
<%=Conf%>
<%
Else
Response.Redirect Request.Form("Confirmation")
End If
%>
no_mac_jack
08-29-2002, 12:39 AM
I'm not sure who all has gotten this to work, but I had it bookmarked so I thought I'd throw it out there anyway. There may be a FP 2002 version if you do a search in the Knowledge Base.
Q205756 (http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q205756&LN=EN-US&SD=gn&FR=0&qry=multiple%20recipients&rnk=2&src=DHCS_MSPSS_gn_SRCH&SPR=FP2000)
Good luck!
~no_mac_jack
Powered by vBulletin® Version 4.1.12 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.