Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending Plain Text with Persits

Status
Not open for further replies.

JohannIcon

Programmer
Sep 3, 2002
440
MT
Dear All,

I am building a mailing list component, and I am giving the user the option to receive either HTML or Plain mail. With HTML mail, I have no problems, the problems arise with the Plain mail. My problem is that it is only sending the last article I add instead of all the articles in the database. This is my code:-

'if Plain Text
sqlSelectPlain="select * from Articles where issueID=" & issueID & " order by articleid"
set rsEmailsPlain=cnnMail.execute(sqlSelectPlain)
do while not rsEmailsPlain.eof
Title = rsEmailsPlain("articletitle")
Text = KillBr(rsEmailsPlain("articletext"))
Line = "-------------------------------------------------------------------------------------------------------------------------------"
PlainText = Title & &quot;<p>&quot; & Text & &quot;<p>&quot; & Line
rsEmailsPlain.movenext
PlainText = KillBr(PlainText)
PlainText = KillP(PlainText)
loop
set rsEmailsPlain=nothing


How can I make it to retreive all the titles and articles which are relevant to this issue and send them?

Thanks for your help
 
In the loop, you are not adding the next record to your varaible, you are replacing it! Just add this to your code:

[tt]PlainText = PlainText & &quot;<p>&quot; & Title & &quot;<p>&quot; & Text & &quot;<p>&quot; & Line[/tt] --James
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top