VitoCorleone
Programmer
Here is my code and i want to know how i can create a bcc when the sendmail function is used in asp
i have a hidden field on the previous page with my email address. and a field where the user enters their email add, the send page picks up those variables and sends to email which is their email add, but how do i add my hidden field.
<%
'sets variables
email = request.form("email")
'chooses username and password from database that correspond to submitted email address.
user = objrs.Fields("userid")
pass = objrs.Fields("pw")
Set sendmail = Server.CreateObject("CDONTS.NewMail")
'put the webmaster address here
sendmail.From = "josephine.renner@bt.com"
'The mail is sent to the address entered in the previous page.
sendmail.To = email
'Enter the subject of your mail here
sendmail.Subject = "Access to GS Finance Reports"
'This is the content of thr message.
sendmail.Body = "You can login GS Finance by entering your username and password." & vbCrlf & vbCrlf _
& "Username = " & user & vbCrlf _
& "password = " & pass & vbCrlf
'this sets mail priority.... 0=low 1=normal 2=high
sendmail.Importance = 2
sendmail.Send
%>
<span class="content">Your login information has been mailed to <%=email%>.<br>
You should receive it shortly.
<%
' Close Data Access Objects and free DB variables
objDC.Close
Set objRS = Nothing
Set objDC = Nothing
Set sendmail = Nothing
%>
<%end if%>
i have a hidden field on the previous page with my email address. and a field where the user enters their email add, the send page picks up those variables and sends to email which is their email add, but how do i add my hidden field.
<%
'sets variables
email = request.form("email")
'chooses username and password from database that correspond to submitted email address.
user = objrs.Fields("userid")
pass = objrs.Fields("pw")
Set sendmail = Server.CreateObject("CDONTS.NewMail")
'put the webmaster address here
sendmail.From = "josephine.renner@bt.com"
'The mail is sent to the address entered in the previous page.
sendmail.To = email
'Enter the subject of your mail here
sendmail.Subject = "Access to GS Finance Reports"
'This is the content of thr message.
sendmail.Body = "You can login GS Finance by entering your username and password." & vbCrlf & vbCrlf _
& "Username = " & user & vbCrlf _
& "password = " & pass & vbCrlf
'this sets mail priority.... 0=low 1=normal 2=high
sendmail.Importance = 2
sendmail.Send
%>
<span class="content">Your login information has been mailed to <%=email%>.<br>
You should receive it shortly.
<%
' Close Data Access Objects and free DB variables
objDC.Close
Set objRS = Nothing
Set objDC = Nothing
Set sendmail = Nothing
%>
<%end if%>