How to password protect Form web pages

S

senn

In case the Library is not installed this one is an alternative.
Try to configure this with your server name.
The configuration.Fields.Item(.........../ sendusing should probably be
changed to 1 instead of 2. Depends on...... Try both.
It's not a good idea reguest.form("To")
I would put in: "youraddress" & "@" & "domain.com"
Because, If someone try to send to other than you. Even if
you plan this. It will not work as the server is another than
yours and hence have an other name.
You got to send a trial-mail to yourself.
/senn

%>
Dim mymail
set mymail = createobject("CDO.Message")
mymail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
mymail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")="mail.domain.com"
'this should be changed 'to the smtp server you have access to
mymail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25
'or the port configured for smtp
mymail.Configuration.Fields.Update

With mymail
.To = request.Form("To")
.From = request.Form("From")
.Subject = request.Form("Subject")
.TextBody = request.Form("Body")
.Send()
End With
Response.Write("Mail Sent!")
Set mymail = nothing
%>
 
G

Guest

Senn,
Thanks for all of your help. After doing a little bit of investigation ( I
admit I should have done it earlier), my hosting service had a script for
sending email from an .asp page. It sends the form data as a .txt
attachment to the email but it does work on .asp pages. Until I can figure
something else out, I will use it.

Now I need to figure out how to write the data from the form to a xxx.txt
page in the root _private folder as FP does when using its form wizards.
Sometime email gets lost and this is a backup of the data sent.

Again, Thanks for all of your help.

Lee Steele
 
S

senn

Senn,
Thanks for all of your help. After doing a little bit of investigation
( I admit I should have done it earlier), my hosting service had a script
for sending email from an .asp page. It sends the form data as a .txt
attachment to the email but it does work on .asp pages. Until I can
figure something else out, I will use it.

Now I need to figure out how to write the data from the form to a xxx.txt
page in the root _private folder as FP does when using its form wizards.
Sometime email gets lost and this is a backup of the data sent.

Again, Thanks for all of your help.

Lee Steele

Probably that's the easy way. If you come into trouble with this too and
go back, then consider, your email server might use authentication. If so
include
and set these two lines below.
In this thread, I learned -once again -a lot of crap-code exists on the
internet.
Why sending an e-mail with asp given rise to a wealth on this subject. Also,
unbelievable cannot be set up by some help in EW2. Wonder, if it can in EW3.

mymail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername")
= "MAIL_SMTP_USERNAME"
mymail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword")
= "MAIL_SMTP_PASSWORD"

Don't answer this time, thank you.
N.B. It's not a good idea posting your e-mail here. Someone of the
regulars is ready to use it and send you a well-working code to your
problem.
-Good for you. But thereby cheating someone else. Happen here before.
Just go down and see the thread of date 4/11 subject:
Display issue Firefox and IE6 & 7
/senn
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top