Email Database Region Results

D

David Berry

Check that the email address in the .TO is correct and then check that the
mail (SMTP) server is really mail.finishlineservices.biz (I guessed on
that part of the code. You'll need to contact your web host, tell them
you're sending email via ASP and want to know the SMTP Server Name.


swalt said:
Thanks for all the help. Almost there. Forms seem to work but not sure
what
is happening to the actual email. It never shows up. Suggestions?

David Berry said:
Should be a period before the TO.

I'm attaching it again


swalt said:
Could not find your NotePad attachment. Did make your suggested
changes.
New
error message:
Microsoft VBScript compilation error '800a0400'

Expected statement

/sendemail.asp, line 35

To = "(e-mail address removed)"
^

:

I see the error. That's a default error page not the real error
message.
In
Internet Explorer go to Tools, Internet Options, Advanced and uncheck
Show
friendly HTTP error messages. Once you do that you'll see that the
real
error is:

Microsoft VBScript compilation error '800a0400'

Expected statement

/Sendemail.asp, line 5

Dim iMsg
^

What's happening is that you have a > symbol in front of the Dim iMsg.
Delete it. I'm guessing that when you copied and pasted the code I
gave
you
from the post you included those little >> symbols that appear in a
reply.
Make sure you don't have any of those. Also, watch out for line
wrapping
with the code I posted (news readers have a bad habit of doing that).
If
you see an error it may be because the line wrapped.

I'm attaching the code in Notepad that shouldn't line wrap. Open the
attachment and paste all that code into the page again (remove what
you
have) to make sure it's all correct.

Yes all - I know we discourage news group attachments but OE drives
me
nuts
with line wraps. I'll take the abuse.

Dave



Made changes. Sendemail page will not display.

The page cannot be displayed
There is a problem with the page you are trying to reach and it
cannot
be
displayed.

--------------------------------------------------------------------------------

Please try the following:

Open the www.finishlineservices.biz home page, and then look for
links
to
the information you want.
Click the Refresh button, or try again later.

Click Search to look for information on the Internet.
You can also see a list of related sites.




HTTP 500 - Internal server error
Internet Explorer



:

The page MUST be a .asp page for this to work and you can NOT use
the
FrontPage Forms handler to do this (it doesn't work with .asp
pages).
You'll have to use all ASP code to send the email.

What page (exactly) is the one with the issue and what's the page
that
passes the information? I looked at the site and it appears that
you
want
useddetails.asp to pass a STOCKID to new_page_2.htm when someone
clicks
"Get
Info". Is that correct? I don't see any hidden fields on
new_page_2.htm

If so, here's what you need to do:

On useddetails.asp change the Get Info link to point to the .asp
page
with
the form

<a href="new_page_2.asp?STOCKID= .. <leave your code to retrieve
the
number>
... ">Get Info</a>

Then rename new_page_2.htm to new_page_2.asp

On new_page_2.asp remove ALL the FrontPage web bot code (FrontPage
Forms
handler) and change the form tag to read:

<FORM METHOD="POST" ACTION="sendemail.asp">

Add back in the hidden field

<input type="hidden" name="ID"
value="<%=Request.QueryString("STOCKID")%>">

Now create a NEW page called sendemail.asp. Switch to Code View
and
Delete
EVERYTHING there (all HTML code) and paste in this code:

<%
Dim iMsg
Dim iConf
Dim Flds
Dim strText

' set the CDOSYS configuration fields to use port 25 on the SMTP
server
Const cdoSendUsingPort = 2

set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")

Set Flds = iConf.Fields

With Flds
..Item("http://schemas.microsoft.com/cdo/configuration/sendusing")
=
cdoSendUsingPort
..Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")
=
"mail.finishlineservices.biz"
..Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout")
= 10
..Update
End With

strText = "Name: " & trim(Request.Form("Contact_FullName")) &
vbCrLf
strText = strText & "Title: " & trim(Request.Form("Contact_Title"))
&
vbCrLf
strText = strText & "Organization: " &
trim(Request.Form("Contact_Organization")) & vbCrLf
strText = strText & "Work Phone: " &
trim(Request.Form("Contact_WorkPhone"))
& vbCrLf
strText = strText & "Fax: " & trim(Request.Form("Contact_FAX")) &
vbCrLf
strText = strText & "Email: " & trim(Request.Form("Contact_Email"))
&
vbCrLf
strText = strText & "URL: " & trim(Request.Form("Contact_URL")) &
vbCrLf
&
vbCrLf
strText = strText & "Please send more information about stock
number"
&
trim(Request.Form("ID")) & vbCrLf


With iMsg
Set .Configuration = iConf
..To = "(e-mail address removed)"
..From = trim(Request.Form("Contact_Email"))
..Subject = "Information Request"
..TextBody = strText
..Send
End With

Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing

Response.Redirect ("useddetails.asp?STOCKID=" &
trim(Request.Form("ID")) )
%>

You can edit the context of the email as you'd like. NOTE: You'll
need
to
find out the correct name of your mail server from your web host.
In
the
code above I put mail.finishlineservices.biz but if that's not
correct
you'll need to change it.

Finally, the last line above (response.redirect) is where they get
sent
after the email is sent. In this example I pass them back to the
useddetails page. You can change this to wherever you want them to
go.

When you're done you should have 3 pages:

useddetails.asp
new_page_2.asp
sendemail.asp


HTH






Made changes. Published. The info request page clears out what
was
entered
(by end user) and does not send to email. site is
www.finishlineservices.biz. Renamed page to htm from asp it send
to
email
but
will not carry the hidden field.
:

Thanks


--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:

http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Stefan, Couple syntax corrections. The hidden field and is
missing
<%
%>.
| and the hyperlink needs some quotes. It should read:
|
| <a href="theformpage.asp?ID=<%=FP_Field(rs, fldname)%>">Get
Info</a>
|
| <input type="hidden" name="ID"
value="<%=Request.QueryString("ID")%>">
|
|
|
| | > Insert a column in the DBR table
| > In that column insert a link to another ASP page
| > (which will contain a form with the info request)
| > and
| > In the hyperlink add a parameter to identify the record
involved
to
you
| > when you get the email
| > (using some unique field (fldname below) from the DBR which
identifies
| > that record)
| >
| > So in the cell the link would look like
| > <a href="theformpage.asp?ID=<%=FP_Field(rs, fldname)%>>Get
Info</a>
| >
| > On the receiving end, in the form add a hidden form field
with
that
ID
| > <input type="hidden" name="ID"
value="Request.QueryString("ID")>
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| >
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > _____________________________________________
| >
| >
| > | > | Sure could usse a bit of help on this one
 
S

swalt

Web host states that SMTP server name is correct. The to email address is
also good. Also note that if the To address is anything other than a "
@finishlineservices.biz i get error message.

David Berry said:
Check that the email address in the .TO is correct and then check that the
mail (SMTP) server is really mail.finishlineservices.biz (I guessed on
that part of the code. You'll need to contact your web host, tell them
you're sending email via ASP and want to know the SMTP Server Name.


swalt said:
Thanks for all the help. Almost there. Forms seem to work but not sure
what
is happening to the actual email. It never shows up. Suggestions?

David Berry said:
Should be a period before the TO.

I'm attaching it again


Could not find your NotePad attachment. Did make your suggested
changes.
New
error message:
Microsoft VBScript compilation error '800a0400'

Expected statement

/sendemail.asp, line 35

To = "(e-mail address removed)"
^

:

I see the error. That's a default error page not the real error
message.
In
Internet Explorer go to Tools, Internet Options, Advanced and uncheck
Show
friendly HTTP error messages. Once you do that you'll see that the
real
error is:

Microsoft VBScript compilation error '800a0400'

Expected statement

/Sendemail.asp, line 5

Dim iMsg
^

What's happening is that you have a > symbol in front of the Dim iMsg.
Delete it. I'm guessing that when you copied and pasted the code I
gave
you
from the post you included those little >> symbols that appear in a
reply.
Make sure you don't have any of those. Also, watch out for line
wrapping
with the code I posted (news readers have a bad habit of doing that).
If
you see an error it may be because the line wrapped.

I'm attaching the code in Notepad that shouldn't line wrap. Open the
attachment and paste all that code into the page again (remove what
you
have) to make sure it's all correct.

Yes all - I know we discourage news group attachments but OE drives
me
nuts
with line wraps. I'll take the abuse.

Dave



Made changes. Sendemail page will not display.

The page cannot be displayed
There is a problem with the page you are trying to reach and it
cannot
be
displayed.

--------------------------------------------------------------------------------

Please try the following:

Open the www.finishlineservices.biz home page, and then look for
links
to
the information you want.
Click the Refresh button, or try again later.

Click Search to look for information on the Internet.
You can also see a list of related sites.




HTTP 500 - Internal server error
Internet Explorer



:

The page MUST be a .asp page for this to work and you can NOT use
the
FrontPage Forms handler to do this (it doesn't work with .asp
pages).
You'll have to use all ASP code to send the email.

What page (exactly) is the one with the issue and what's the page
that
passes the information? I looked at the site and it appears that
you
want
useddetails.asp to pass a STOCKID to new_page_2.htm when someone
clicks
"Get
Info". Is that correct? I don't see any hidden fields on
new_page_2.htm

If so, here's what you need to do:

On useddetails.asp change the Get Info link to point to the .asp
page
with
the form

<a href="new_page_2.asp?STOCKID= .. <leave your code to retrieve
the
number>
... ">Get Info</a>

Then rename new_page_2.htm to new_page_2.asp

On new_page_2.asp remove ALL the FrontPage web bot code (FrontPage
Forms
handler) and change the form tag to read:

<FORM METHOD="POST" ACTION="sendemail.asp">

Add back in the hidden field

<input type="hidden" name="ID"
value="<%=Request.QueryString("STOCKID")%>">

Now create a NEW page called sendemail.asp. Switch to Code View
and
Delete
EVERYTHING there (all HTML code) and paste in this code:

<%
Dim iMsg
Dim iConf
Dim Flds
Dim strText

' set the CDOSYS configuration fields to use port 25 on the SMTP
server
Const cdoSendUsingPort = 2

set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")

Set Flds = iConf.Fields

With Flds
..Item("http://schemas.microsoft.com/cdo/configuration/sendusing")
=
cdoSendUsingPort
..Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")
=
"mail.finishlineservices.biz"
..Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout")
= 10
..Update
End With

strText = "Name: " & trim(Request.Form("Contact_FullName")) &
vbCrLf
strText = strText & "Title: " & trim(Request.Form("Contact_Title"))
&
vbCrLf
strText = strText & "Organization: " &
trim(Request.Form("Contact_Organization")) & vbCrLf
strText = strText & "Work Phone: " &
trim(Request.Form("Contact_WorkPhone"))
& vbCrLf
strText = strText & "Fax: " & trim(Request.Form("Contact_FAX")) &
vbCrLf
strText = strText & "Email: " & trim(Request.Form("Contact_Email"))
&
vbCrLf
strText = strText & "URL: " & trim(Request.Form("Contact_URL")) &
vbCrLf
&
vbCrLf
strText = strText & "Please send more information about stock
number"
&
trim(Request.Form("ID")) & vbCrLf


With iMsg
Set .Configuration = iConf
..To = "(e-mail address removed)"
..From = trim(Request.Form("Contact_Email"))
..Subject = "Information Request"
..TextBody = strText
..Send
End With

Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing

Response.Redirect ("useddetails.asp?STOCKID=" &
trim(Request.Form("ID")) )
%>

You can edit the context of the email as you'd like. NOTE: You'll
need
to
find out the correct name of your mail server from your web host.
In
the
code above I put mail.finishlineservices.biz but if that's not
correct
you'll need to change it.

Finally, the last line above (response.redirect) is where they get
sent
after the email is sent. In this example I pass them back to the
useddetails page. You can change this to wherever you want them to
go.

When you're done you should have 3 pages:

useddetails.asp
new_page_2.asp
sendemail.asp


HTH






Made changes. Published. The info request page clears out what
was
entered
(by end user) and does not send to email. site is
www.finishlineservices.biz. Renamed page to htm from asp it send
to
email
but
will not carry the hidden field.
:

Thanks


--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:

http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Stefan, Couple syntax corrections. The hidden field and is
missing
<%
%>.
| and the hyperlink needs some quotes. It should read:
|
| <a href="theformpage.asp?ID=<%=FP_Field(rs, fldname)%>">Get
Info</a>
|
| <input type="hidden" name="ID"
value="<%=Request.QueryString("ID")%>">
|
 
D

David Berry

That may be because they don't allow SMTP email from other email addresses.
Can you get an email address ending in finishlineservices.biz? If they tell
you the server requires outgoing authentication insert the lines below right
BEFORE the line that says .Update (after the other .ITEM lines) and use a
valid email address and password (ask your host what this is).

..Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") =
1 'basic (clear-text) authentication
..Item ("http://schemas.microsoft.com/cdo/configuration/sendusername")
="(e-mail address removed)"
..Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword")
="yourpassword"

See http://www.powerasp.com/content/new/sending_email_cdosys.asp for more
information about sending from a remote server



swalt said:
Web host states that SMTP server name is correct. The to email address is
also good. Also note that if the To address is anything other than a "
@finishlineservices.biz i get error message.

David Berry said:
Check that the email address in the .TO is correct and then check that
the
mail (SMTP) server is really mail.finishlineservices.biz (I guessed on
that part of the code. You'll need to contact your web host, tell them
you're sending email via ASP and want to know the SMTP Server Name.


swalt said:
Thanks for all the help. Almost there. Forms seem to work but not sure
what
is happening to the actual email. It never shows up. Suggestions?

:

Should be a period before the TO.

I'm attaching it again


Could not find your NotePad attachment. Did make your suggested
changes.
New
error message:
Microsoft VBScript compilation error '800a0400'

Expected statement

/sendemail.asp, line 35

To = "(e-mail address removed)"
^

:

I see the error. That's a default error page not the real error
message.
In
Internet Explorer go to Tools, Internet Options, Advanced and
uncheck
Show
friendly HTTP error messages. Once you do that you'll see that the
real
error is:

Microsoft VBScript compilation error '800a0400'

Expected statement

/Sendemail.asp, line 5

Dim iMsg
^

What's happening is that you have a > symbol in front of the Dim
iMsg.
Delete it. I'm guessing that when you copied and pasted the code I
gave
you
from the post you included those little >> symbols that appear in a
reply.
Make sure you don't have any of those. Also, watch out for line
wrapping
with the code I posted (news readers have a bad habit of doing
that).
If
you see an error it may be because the line wrapped.

I'm attaching the code in Notepad that shouldn't line wrap. Open
the
attachment and paste all that code into the page again (remove what
you
have) to make sure it's all correct.

Yes all - I know we discourage news group attachments but OE
drives
me
nuts
with line wraps. I'll take the abuse.

Dave



Made changes. Sendemail page will not display.

The page cannot be displayed
There is a problem with the page you are trying to reach and it
cannot
be
displayed.

--------------------------------------------------------------------------------

Please try the following:

Open the www.finishlineservices.biz home page, and then look for
links
to
the information you want.
Click the Refresh button, or try again later.

Click Search to look for information on the Internet.
You can also see a list of related sites.




HTTP 500 - Internal server error
Internet Explorer



:

The page MUST be a .asp page for this to work and you can NOT
use
the
FrontPage Forms handler to do this (it doesn't work with .asp
pages).
You'll have to use all ASP code to send the email.

What page (exactly) is the one with the issue and what's the
page
that
passes the information? I looked at the site and it appears
that
you
want
useddetails.asp to pass a STOCKID to new_page_2.htm when someone
clicks
"Get
Info". Is that correct? I don't see any hidden fields on
new_page_2.htm

If so, here's what you need to do:

On useddetails.asp change the Get Info link to point to the .asp
page
with
the form

<a href="new_page_2.asp?STOCKID= .. <leave your code to retrieve
the
number>
... ">Get Info</a>

Then rename new_page_2.htm to new_page_2.asp

On new_page_2.asp remove ALL the FrontPage web bot code
(FrontPage
Forms
handler) and change the form tag to read:

<FORM METHOD="POST" ACTION="sendemail.asp">

Add back in the hidden field

<input type="hidden" name="ID"
value="<%=Request.QueryString("STOCKID")%>">

Now create a NEW page called sendemail.asp. Switch to Code View
and
Delete
EVERYTHING there (all HTML code) and paste in this code:

<%
Dim iMsg
Dim iConf
Dim Flds
Dim strText

' set the CDOSYS configuration fields to use port 25 on the SMTP
server
Const cdoSendUsingPort = 2

set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")

Set Flds = iConf.Fields

With Flds
..Item("http://schemas.microsoft.com/cdo/configuration/sendusing")
=
cdoSendUsingPort
..Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")
=
"mail.finishlineservices.biz"
..Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout")
= 10
..Update
End With

strText = "Name: " & trim(Request.Form("Contact_FullName")) &
vbCrLf
strText = strText & "Title: " &
trim(Request.Form("Contact_Title"))
&
vbCrLf
strText = strText & "Organization: " &
trim(Request.Form("Contact_Organization")) & vbCrLf
strText = strText & "Work Phone: " &
trim(Request.Form("Contact_WorkPhone"))
& vbCrLf
strText = strText & "Fax: " & trim(Request.Form("Contact_FAX"))
&
vbCrLf
strText = strText & "Email: " &
trim(Request.Form("Contact_Email"))
&
vbCrLf
strText = strText & "URL: " & trim(Request.Form("Contact_URL"))
&
vbCrLf
&
vbCrLf
strText = strText & "Please send more information about stock
number"
&
trim(Request.Form("ID")) & vbCrLf


With iMsg
Set .Configuration = iConf
..To = "(e-mail address removed)"
..From = trim(Request.Form("Contact_Email"))
..Subject = "Information Request"
..TextBody = strText
..Send
End With

Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing

Response.Redirect ("useddetails.asp?STOCKID=" &
trim(Request.Form("ID")) )
%>

You can edit the context of the email as you'd like. NOTE:
You'll
need
to
find out the correct name of your mail server from your web
host.
In
the
code above I put mail.finishlineservices.biz but if that's not
correct
you'll need to change it.

Finally, the last line above (response.redirect) is where they
get
sent
after the email is sent. In this example I pass them back to
the
useddetails page. You can change this to wherever you want them
to
go.

When you're done you should have 3 pages:

useddetails.asp
new_page_2.asp
sendemail.asp


HTH






Made changes. Published. The info request page clears out what
was
entered
(by end user) and does not send to email. site is
www.finishlineservices.biz. Renamed page to htm from asp it
send
to
email
but
will not carry the hidden field.
:

Thanks


--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:

http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Stefan, Couple syntax corrections. The hidden field and is
missing
<%
%>.
| and the hyperlink needs some quotes. It should read:
|
| <a href="theformpage.asp?ID=<%=FP_Field(rs, fldname)%>">Get
Info</a>
|
| <input type="hidden" name="ID"
value="<%=Request.QueryString("ID")%>">
|
 
S

swalt

I am using an email ending in finishlineservices.biz. When I click the submit
button it returns me to the details page as written in the code. It's just
the email the never seems to go out.
 
D

David Berry

If that's the case then the code is working just fine. The problem is with
your web host. Contact them and let them know you're sending email using
CDOSYS on an ASP page (tell them the email address you're sending to) and
ask them why it's not getting sent out.
 
S

swalt

Thanks David. Contacted host. Changed smtpserver to = "local host"
Working like a charm. Thanks again.
 
D

David Berry

Glad to hear it! WOW! This was a Loooooooooooong thread but at least we
got you there! :)

As you found out, there are a lot of things you can do with ASP (or other
server-side scripting) but in some cases there might be something on the
host's end you have to watch out for, like trying to send email.

Good Luck with the rest of your site.
 

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