This topic is locked

sending email addressed from a table field

4/4/2008 2:12:33 PM
ASPRunnerPro General questions
C
csernusoft author

Hi All,
Please help.
I would like to use List Page event Sub BeforeMoveNextList(rs,row,col).

to send an email at every record on the list page.
The email address should come from the record - field person.email .
If I replace test@test.com with my email address , it is working.
But how can I have the address from the record ?

Also how can I put other fields to the message body ?
Thanks in advance
Imre
'** Send simple email ****

' do not forget to setup email parameters like From, SMTP server etc

' on 'Security->User login settings' dialog
email="test@test.com"

message="Hello there" & vbcrlf & "Best regards"

subject="Sample subject"

sendmail email, subject, message

Sergey Kornilov admin 4/4/2008

Use the following:
email = rs("person.email")

C
csernusoft author 4/4/2008

Use the following:

email = rs("person.email")


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

Sergey,
In spite of there are two records , the error message comes up:
ASP error happened
Technical information

Error number 3265

Error description Item cannot be found in the collection corresponding to the requested name or ordinal.

URL /ic185009_ncr_com/Test1/Persons_list.asp

SQL query SELECT top 20 [RowID], name, email, [comment], password FROM Persons

Solution There are no records in the recordset.
Please edit your event code in the following way:
strSQL = "select * from AnyTable where AnyColumn='AnyValue'"
set rsTemp = CreateObject("ADODB.Recordset")
rsTemp.Open strSQLExists, dbConnection
and then use rsTemp("fieldname").
Or you can contact to support@xlinesoft.com and send your event code. We'll help you.
---------------------------------------

?
Thanks

Imre

C
csernusoft author 4/6/2008



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

Sergey,
In spite of there are two records , the error message comes up:
ASP error happened
Technical information

Error number 3265

Error description Item cannot be found in the collection corresponding to the requested name or ordinal.

URL /ic185009_ncr_com/Test1/Persons_list.asp

SQL query SELECT top 20 [RowID], name, email, [comment], password FROM Persons

Solution There are no records in the recordset.
Please edit your event code in the following way:
strSQL = "select * from AnyTable where AnyColumn='AnyValue'"
set rsTemp = CreateObject("ADODB.Recordset")
rsTemp.Open strSQLExists, dbConnection
and then use rsTemp("fieldname").
Or you can contact to support@xlinesoft.com and send your event code. We'll help you.
---------------------------------------

?
Thanks

Imre


Hello Sergey,
Please ignore my previous post ,

email = rs("email") is working !
Thanks for your help
Imre