Forums
This topic is locked
ServerObjects ASPmail,multiple recipients from rs
Posted 21 Jun 2002 19:11:55
1
has voted
21 Jun 2002 19:11:55 Lesley Gregg posted:
ASP, mySQL, VBscript, DreamweaverUltradev4, ServerObjects-ASPmail,This one's got me beat.
I have an asp webpage that displays records in a repeat region along with a checkbox for each.
From the list of records, those that are subsequently checked in their checkbox, then get their id's passed to the next page in a string.
The id's that are passed to this next page are then used as a filter in a recordset. No problem so far.
The difficulty I have, is that it doesn't seem to be possible to use this recordset to send an email to multiple recipients. The email and firstnames of the recipients are drawn from the database via this filtered recordset.
I've read ServerObject's help stuff - no clues there.
It would at least be useful to know whether or not this is even possible. I have tried to email ServerObjects in the past but have not received any replies.
This seems to be a real tuffy and I would be flabberghasted if anyone is able to solve it!
Any know how to do it please?
Replies
Replied 24 Jun 2002 18:26:46
24 Jun 2002 18:26:46 Andrew Watson replied:
Look at my tut on this technique here
www.udzone.com/ShowDetail.asp?NewsId=3369
:: Son, im Thirty.... ::
www.udzone.com/ShowDetail.asp?NewsId=3369
:: Son, im Thirty.... ::
Replied 24 Jun 2002 18:47:20
24 Jun 2002 18:47:20 Lesley Gregg replied:
Looked at tutorial as suggested but it didn't cover specific scenario of actually getting data into ServerObject's email coding.
No problem, have found answer on another forum, but thank you for responding.
Regards,
Lesely G
No problem, have found answer on another forum, but thank you for responding.
Regards,
Lesely G
Replied 05 Jul 2002 18:28:49
05 Jul 2002 18:28:49 Lesley Gregg replied:
In case anyone wants to know:
<%
Dim Mailer
Set Mailer = Server.CreateObject("SMTPsvg.Mailer"
Mailer.FromName = "this will appear in FROM line of email"
Mailer.FromAddress = " "
Mailer.RemoteHost = "your.whoever.net"
'While the recordset is not empty, do this
While Not rsEmail.EOF Or rsEmail.BOF
Mailer.AddBCC rsEmail("firstName", rsEmail("email"
'Move to the next record
rsEmail.MoveNext()
Wend
Mailer.Subject = "See you in the pub?"
Mailer.BodyText = Request.QueryString("message"
if Mailer.SendMail then
Response.Write "Emails sent"
else
Response.Write "Mail send failure. <BR> Try again<BR> Error was " & Mailer.Response
end if
Set Mailer = Nothing
%>
<%
Dim Mailer
Set Mailer = Server.CreateObject("SMTPsvg.Mailer"
Mailer.FromName = "this will appear in FROM line of email"
Mailer.FromAddress = " "
Mailer.RemoteHost = "your.whoever.net"
'While the recordset is not empty, do this
While Not rsEmail.EOF Or rsEmail.BOF
Mailer.AddBCC rsEmail("firstName", rsEmail("email"
'Move to the next record
rsEmail.MoveNext()
Wend
Mailer.Subject = "See you in the pub?"
Mailer.BodyText = Request.QueryString("message"
if Mailer.SendMail then
Response.Write "Emails sent"
else
Response.Write "Mail send failure. <BR> Try again<BR> Error was " & Mailer.Response
end if
Set Mailer = Nothing
%>
Replied 22 May 2006 18:23:54
22 May 2006 18:23:54 Sandra Burne replied:
I tried using this code with little success. It crashes with an 800a000d type mismatch error on the line:
Mailer.AddBCC rsEmail(firstName", rsEmail("email"
I've hunted around for a solution but so far have had no success. It's not a problem with the recordset as that's functionning fine. I've got a syntax problem but can't see it.
Can anyone help me?
Regards
Simcha
Mailer.AddBCC rsEmail(firstName", rsEmail("email"
I've hunted around for a solution but so far have had no success. It's not a problem with the recordset as that's functionning fine. I've got a syntax problem but can't see it.
Can anyone help me?
Regards
Simcha