Go Back   CodingForums.com > :: Server side development > ASP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-09-2008, 11:19 PM   PM User | #1
rlaxton
New Coder

 
Join Date: Apr 2004
Location: Atlanta, GA
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
rlaxton is an unknown quantity at this point
ASPMail 4.x - multi recipients


I have an Access DB with a field for 'Name' and one for 'fEmail'.

I'm trying to get it to write one email and send to multiple recipients. I can't see the error! There are 3 entries in the DB. Instead of one email going to ea of the email addy's i get 2 of the same emails to one addr:
======================
set rsRecords = dbaseConn.execute("select * from tblMail")

vSubject = request.form("fSubject")
vBody = request.form("fBody")
Set Mail = Server.CreateObject("SMTPsvg.Mailer")

Do while not rsRecords.EOF
varEM = rsRecords("fEmail")
varNm = rsRecords("Name")
Mail.AddRecipient varNm,varEM
rsRecords.MoveNext
Loop
rsRecords.close

Mail.FromAddress= "admin@removed.net"
Mail.RemoteHost = "mrelay.perfora.net"
Mail.Subject = vSubject
Mail.BodyText = vBody
Mail.Sendmail

dbaseConn.close
The email goes to addr #2(Robin2), 2 times.
The 'To' line in the email:
"robin" <rdlax@url1.com>, "Robin2" <robin@url2.com>, "Robin3" <admin@url3.com>
I changed the email addy's for this posting, but can confirm the actual addy's in the 'to' line are valid.
rlaxton is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:37 PM.


Advertisement
Log in to turn off these ads.