Ask a Question related to Dreamweaver AppDev, Design and Development.
-
baz0hara #1
Jmail only sending "body" in first run of loop
I have designed a newsletter that will send any news to my subscribers as soon
as it is added to my front page. I have four dynamic bindings which are: email,
title, date and body. the first three bindings work fine through the 'while'
loop and each subscriber does receive an email with the title and date present.
However, when it comes to the body only the first subscriber recieves the body
and all others are blank. this is really puzzling me and i have no reason why
this is happening ... Has anyone experienced anything like this before? After
the while loop the page produces the newsletter underneath so i can see what
they have recieved and this also has no body text. Here is my 'while' loop ->
Code:<% While ((Repeat1__numRows <> 0) AND (NOT rs_email.EOF)) %> <% Dim fullName, email FullName = 0 email = 0 fullName = (rs_email.Fields.Item('fullName').Value) email = (rs_email.Fields.Item('email').Value) 'email = 'garrybibson@hotmail.com' set msg = Server.CreateOBject( 'JMail.Message' ) msg.ContentType = 'text/html' msg.Logging = true msg.silent = true msg.From = 'info@stelphick.com' msg.AddRecipient email msg.Subject = 'Stelphick United Newsletter' 'msg.Body = 'News has been added to the Stelphick United Website, please follow this link to read it! www.stelphick.com/news.asp' msg.Body = '<style type=''text/css''>.titlegreen {font-family: verdana;font-size: 13px;color: #003333;font-weight: bold;text-transform: capitalize;}--></style>' msg.Body = msg.Body & '<style type=''text/css''>.standard {font-family: verdana;font-size: 12px;color: #000000;}--></style>' msg.Body = msg.Body & '<style type=''text/css''>.date {font-family: verdana;font-size: 12px;font-weight: lighter;color: #000000;}--></style>' msg.Body = msg.Body & '<style type=''text/css''> A:link {FONT-WEIGHT: bold;FONT-SIZE: 12px;COLOR: #336666;font-family: Verdana;}--></style>' msg.Body = msg.Body & '<style type=''text/css''> A:visited {FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #336666; font-family: Verdana;}--></style>' msg.Body = msg.Body & '<style type=''text/css''> A:hover {FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #000000; font-family: Verdana;}--></style>' msg.Body = msg.Body & '<span class=''titlegreen''>' msg.Body = msg.Body & '<table width=''600''/></td></tr>' msg.Body = msg.Body & '<tr><td><table width=''100%'' cellspacing=''3''><tr><td><table width=''100%'' background=''http://www.stelphick.com/images/dotted2.gif''><tr><td class=''titlegreen''>' msg.Body = msg.Body & (rs_news.Fields.Item('title').Value) msg.Body = msg.Body & '</td><td class=''date''><div align=''right''>' msg.Body = msg.Body & (rs_news.Fields.Item('newsdate').Value) msg.Body = msg.Body & '</div></td></tr></table></td></tr><tr><td class=''standard''><div align=''justify''>' msg.Body = msg.Body & (rs_news.Fields.Item('body').Value) msg.Body = msg.Body & '</div></td></tr><tr><td class=''greentitle''><a href=http://www.stelphick.com>Click here to visit the Stelphick United Website</a></td></tr></table></td></tr></table>' 'msg.Body = msg.Body & (rs_news.Fields.Item('title').Value) 'msg.Body = msg.Body & '</span>' 'msg.Body = msg.Body & '<span class=''date''>' 'msg.Body = msg.Body & (rs_news.Fields.Item('newsdate').Value) 'msg.Body = msg.Body & '</span>' 'msg.Body = msg.Body & '<br />' 'msg.Body = msg.Body & '<span class=''standard''>' 'msg.Body = msg.Body & (rs_news.Fields.Item('body').Value) 'msg.Body = msg.Body & '</span>' if not msg.Send('10.2.0.81') then Response.write 'Error Please email info@stelphick.com' else Response.write 'Message sent succesfully!' end if %> <p>Recipients</p> <table width='500' border='0' cellspacing='0' cellpadding='0'> <tr> <td width='50%'><%=(rs_email.Fields.Item('fullName').Value)%></td> <td width='50%'><%=(rs_email.Fields.Item('email').Value)%></td> </tr> </table> <% Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 rs_email.MoveNext() Wend %>><tr><td><img src=''http://www.stelphick.com/images/emailnews.jpg''baz0hara Guest
-
cfprocparam sending "???????" to SQL Server
I have a SQL Server stored procedure that expects an nvarchar parameter. The cfprocparam is sending Russian characters, but the stored proc seems... -
"activation required" loop
every day i use FHMXa, it requires an internet activation... i've contacted the hotline, they gave me a de-install and re-install procedure that... -
Sending "forms" without text?? Please help
Hi, my knowledge of Flash so far is very basic but I am trying to learn. I would like to know if it's possible to do a screen capture and mail... -
Problem sending mail on Server 2003 "SendUsing" configuration is invalid
Hi, I have a C# asp.net app that sent mail fine on server 2000 or win 2000, but now I moved it to our new 2003 box, and it's giving me "The... -
"Start" "Program" "Menu" list is empty
For what ever reason my list of installed programs in my "Start" "Programs" menu is empty. Anyone know how to restore the list. Thanks for your... -
baz0hara #2
Re: Jmail only sending "body" in first run of loop
I have set up a test page to debug my problem and it seems the the database is
only letting me use the binding called 'body' once where as it is happy to let
me use others more than once. please visit the following page to see
[url]http://www.stelphick.com/distnews2.asp[/url] next to recipient would be the
subscribers name and address plus the sent conformation message but i have code
these out the code for now. at the bottom of the page i have wrote the
following code TITLE1<%=(rs_news.Fields.Item('title').Value)%>TIT LE1<br />
BODY1<%=(rs_news.Fields.Item('body').Value)%>BODY1 <br />
TITLE2<%=(rs_news.Fields.Item('title').Value)%>TIT LE2<br />
BODY2<%=(rs_news.Fields.Item('body').Value)%>BODY2 from looking at the above
page you will see the second time the 'body' binding appears in the code (last
line) it is not translated onto the page. This is the root of my problem
because the jmail loop sends the body to the first recipient only. I have no
idea why the 'body' binding can only be used once when this is not consistent
with the other variables. Any feedback would be fantastic, even just
brainstorming on a possible fix woiuld be great! Thanks in advance Barry
baz0hara Guest



Reply With Quote

