Sep 17, 2002 #1 JazzLeg Programmer Aug 22, 2002 63 GB hi, When using jmail, can more than 1 recipient be used in the AddRecipient setting? If so, how? Thanks
hi, When using jmail, can more than 1 recipient be used in the AddRecipient setting? If so, how? Thanks
Sep 17, 2002 #2 anyideas Programmer May 2, 2002 127 GB Yes - it's fairly simple - you can do it either like this: jmail.AddRecipient "blah1@blah.co.uk" jmail.AddRecipient "blah2@blah.co.uk" or you can do it dynamically - shown in the below code Mark ------------------------------ <%@ Language=VBScript %> <!-- #include file="dbConn.asp" --> <html> <head> </head> <body> <% Set jmail = Server.CreateObject("JMail.Message" Set rsListVotes = Server.CreateObject("ADODB.Recordset" Set rsListVotes = dbConn.Execute( "SELECT * FROM vw_Usernames while rsListVotes.EOF = false jmail.AddRecipient rsListVotes("username"&"@blah.co.uk" rsListVotes.MoveNext Wend jmail.From = "wizard@blah.co.uk" jmail.Subject = "This months OnFriday Arrangement" jmail.Body = "This is an automated e-mail" jmail.Send( "172.116.12.17" ) %> Email Sent </body> </html> <%set rsListVotes = nothing%> Upvote 0 Downvote
Yes - it's fairly simple - you can do it either like this: jmail.AddRecipient "blah1@blah.co.uk" jmail.AddRecipient "blah2@blah.co.uk" or you can do it dynamically - shown in the below code Mark ------------------------------ <%@ Language=VBScript %> <!-- #include file="dbConn.asp" --> <html> <head> </head> <body> <% Set jmail = Server.CreateObject("JMail.Message" Set rsListVotes = Server.CreateObject("ADODB.Recordset" Set rsListVotes = dbConn.Execute( "SELECT * FROM vw_Usernames while rsListVotes.EOF = false jmail.AddRecipient rsListVotes("username"&"@blah.co.uk" rsListVotes.MoveNext Wend jmail.From = "wizard@blah.co.uk" jmail.Subject = "This months OnFriday Arrangement" jmail.Body = "This is an automated e-mail" jmail.Send( "172.116.12.17" ) %> Email Sent </body> </html> <%set rsListVotes = nothing%>