MS SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMS SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 27th, 2004, 12:44 AM
niclipse niclipse is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 3 niclipse User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to niclipse
Mass Email: Text body keeps looping in each email

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.realestate321.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,

Nick McGirr
Real Estate Agent
http://www.realestate321.com/
"Buying and Selling Homes in the (321) 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.realestate321.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,

Nick McGirr
Real Estate Agent
http://www.realestate321.com/
"Buying and Selling Homes in the (321) 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.realestate321.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,

Nick McGirr
Real Estate Agent
http://www.realestate321.com/
"Buying and Selling Homes in the (321) 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.realestate321.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,

Nick McGirr
Real Estate Agent
http://www.realestate321.com/
"Buying and Selling Homes in the (321) 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.realestate321.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 & "Nick McGirr" & vbcrlf
strTXT = strTXT & "Real Estate Agent" & vbcrlf
strTXT = strTXT & "http://www.realestate321.com/" & vbcrlf
strTXT = strTXT & """Buying and Selling Homes in the (321) 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
%>

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMS SQL Development > Mass Email: Text body keeps looping in each email


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway