|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Mass email problem: Text is Looping!
First off, my server uses CDO, the updated version of CDONTS, to send mail.
The script works however, it sends the emails out and keeps looping the message body within the text of the email. here's an example: I added fake users to my table called REALTORS. this was the result of the email sent out: <!-- START EMAIL MAIL OUT --> I am an realtor in Florida and I found you from surfing around Poop Title http://www.poop.com I have a real estate site and I am interested in exchanging links with your site. This is benefitial to you and I because each external website that links to your page counts as a "vote" for your website. The more links to your site, the better search engine placement you will recieve in google (it's called Google PageRank)...which ultimately means more exposure. It's a win/win situation. If you are interested, you may add your website to my link directory at the address below (it's all automated). Make sure to pick your correct category and sub-categories: http://www.mydomain.com/resources/resources.asp Once added you will be placed in a "holding bin" waiting to be approved. Your site will be approved when I find a link on your website to my website. My website will send out a "robot" once a month to make sure that my link is still on your site. If it's not understandably, your link will be removed from my page by that robot. Best Regards, --Name-- ---Agent--- http://www.mydomain.com/ "Buying and Selling Homes in the (000) Area Code."I am an realtor in Florida and I found you from surfing around Haha titleage http://www.hahaha.com I have a real estate site and I am interested in exchanging links with your site. This is benefitial to you and I because each external website that links to your page counts as a "vote" for your website. The more links to your site, the better search engine placement you will recieve in google (it's called Google PageRank)...which ultimately means more exposure. It's a win/win situation. If you are interested, you may add your website to my link directory at the address below (it's all automated). Make sure to pick your correct category and sub-categories: http://www.mydomain.com/resources/resources.asp Once added you will be placed in a "holding bin" waiting to be approved. Your site will be approved when I find a link on your website to my website. My website will send out a "robot" once a month to make sure that my link is still on your site. If it's not understandably, your link will be removed from my page by that robot. Best Regards, --Name-- ---Agent--- http://www.mydomain.com/ "Buying and Selling Homes in the (000) Area Code."I am an realtor in Florida and I found you from surfing around niclipse . com http://www.niclipse.com I have a real estate site and I am interested in exchanging links with your site. This is benefitial to you and I because each external website that links to your page counts as a "vote" for your website. The more links to your site, the better search engine placement you will recieve in google (it's called Google PageRank)...which ultimately means more exposure. It's a win/win situation. If you are interested, you may add your website to my link directory at the address below (it's all automated). Make sure to pick your correct category and sub-categories: http://www.mydomain.com/resources/resources.asp Once added you will be placed in a "holding bin" waiting to be approved. Your site will be approved when I find a link on your website to my website. My website will send out a "robot" once a month to make sure that my link is still on your site. If it's not understandably, your link will be removed from my page by that robot. Best Regards, --Name-- ---Agent--- http://www.mydomain.com/ "Buying and Selling Homes in the (000) Area Code."I am an realtor in Florida and I found you from surfing around. I have a real estate site and I am interested in exchanging links with your site. This is benefitial to you and I because each external website that links to your page counts as a "vote" for your website. The more links to your site, the better search engine placement you will recieve in google (it's called Google PageRank)...which ultimately means more exposure. It's a win/win situation. If you are interested, you may add your website to my link directory at the address below (it's all automated). Make sure to pick your correct category and sub-categories: http://www.mydomain.com/resources/resources.asp Once added you will be placed in a "holding bin" waiting to be approved. Your site will be approved when I find a link on your website to my website. My website will send out a "robot" once a month to make sure that my link is still on your site. If it's not understandably, your link will be removed from my page by that robot. Best Regards, --Name-- ---Agent--- http://www.mydomain.com/ "Buying and Selling Homes in the (000) Area Code." <!--[==-- EMAIL MAIL OUT FINISHED -------> ANY IDEAS ON HOW TO SEND EACH EMAIL TO EACH USER INDIVIDUALLY WHILE USING THE INFORMATION LINKED IN THE DATABASE WITHOUT LOOPING OTHER PEOPLE'S DB INFO IN THE SAME EMAIL? Here's the script below.... <title>Email The List</title> <% nickemail = request.form("sender") subject = request.form("subject") If Len(subject) > 0 Then dsn="Provider=SQLOLEDB;Data Source=sql.string.com, etc ect" Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open dsn Set RS = Server.CreateObject("ADODB.Recordset") SQL = "SELECT title, url, email FROM Realtors" RS.open SQL, conn Do While NOT RS.eof strTXT = strTXT & "I am an realtor in Florida and I found you from surfing around" If Len(RS("title")) > 0 Then strTXT = strTXT & vbcrlf & vbcrlf & RS("title") & vbcrlf strTXT = strTXT & RS("url") & vbcrlf & vbcrlf Else strTXT = strTXT & "." & vbcrlf & vbcrlf End If strTXT = strTXT & "I have a real estate site and I am interested in exchanging links with your site. This is benefitial to you and I because each external website that links to your page counts as a ""vote"" for your website. The more links to your site, the better search engine placement you will recieve in google (it's called Google PageRank)...which ultimately means more exposure. It's a win/win situation." &vbcrlf &vbcrlf strTXT = strTXT & "If you are interested, you may add your website to my link directory at the address below (it's all automated). Make sure to pick your correct category and sub-categories:" &vbcrlf strTXT = strTXT & "http://www.mydomain.com/resources/resources.asp" & vbcrlf strTXT = strTXT & "Once added you will be placed in a ""holding bin"" waiting to be approved. Your site will be approved when I find a link on your website to my website. My website will send out a ""robot"" once a month to make sure that my link is still on your site. If it's not understandably, your link will be removed from my page by that robot." & vbcrlf &vbcrlf strTXT = strTXT & "Best Regards," & vbcrlf & vbcrlf strTXT = strTXT & "--Name--" & vbcrlf strTXT = strTXT & "---Agent---" & vbcrlf strTXT = strTXT & "http://www.mydomain.com/" & vbcrlf strTXT = strTXT & """Buying and Selling Homes in the (000) Area Code.""" set objMessage = createobject("cdo.message") set objConfig = createobject("cdo.configuration") ' Setting the SMTP Server Set Flds = objConfig.Fields Flds.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost" Flds.update Set objMessage.Configuration = objConfig objMessage.To = RS("email") objMessage.From = nickemail objMessage.Subject = subject objMessage.TextBody = strTXT 'objMessage.HtmlBody = strHTML objMessage.fields.update objMessage.Send RS.movenext Loop Conn.close set Conn = nothing set objMessage = nothing set objConfig = nothing ShowThanksMsg Else End If ShowForm Sub ShowForm %> <% Session("department")="home" %> <center> <form action=email.asp method=post> <table border=0 cellpadding=4 cellspacing=2> <table> <tr><td><font class=tbody><b>From:</b></font></td><td><input type=text name=sender value="me@me.com"></td></tr> <tr><td><font class=tbody><b>To:</b></font></td><td><font class=tbody>Brevard County Emails</font></td></tr> <tr><td><font class=tbody><b>Subject:</b></font></td><td><input class=inputfield type=text name=subject size=22></td></tr> <tr><td colspan=2><input type=image align=right src=/_images/submit.gif border=0 name=B1></td></tr> </table> </form></center> <!-- <tr><td colspan=2><font class=tbody><b>Comments:</b></font><br><textarea class=inputfield rows=3 maxlength=100 name=message cols=40></textarea></td></tr> --> <% End Sub Sub ShowThanksMsg() response.write "<center><font size=5><b>Message Sent!</b></font><br><br>" response.write "your message has been delivered to all members." End Sub %> |
|
#2
|
|||
|
|||
|
Change
strTXT = strTXT & "I am an realtor in Florida and I found you from surfing around" to strTXT = "I am an realtor in Florida and I found you from surfing around" bob@icdc.com |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft SQL Server > Mass email problem: Text is Looping! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|