G
|
gonzalosb author 3/17/2014 |
Ok, maybe look for work around. |
G
|
gonzalosb author 5/9/2014 |
i found this code on the manual page email_to_selected_users but give me an error that says " no email found, you need to have at least 1 email", but i have 7 emails on the database. response.Flush dim arr,record, email_list, rmail, arr2, where, errmsg, ret currentTable = "" email_list="" set rmail=CreateDictionary() DoAssignment record, button.getNextSelectedRecord() do while isObject(record) arr=split(record("[color="#FF0000"]ID"),"&") if asp_count(arr)>=0 then set arr2=CreateDictionary() arr2("")=asp_urldecode(arr(0)) where = KeyWhere(arr2,"") set data = dal.Table(currentTable).Query(where,"") if data("[color="#FF0000"]E-mail Selected")<>"" then email_list=email_list & data("[color="#FF0000"]E-mail") & "," end if data.close set data=nothing end if DoAssignment record, button.getNextSelectedRecord() loop if email_list<>"" then email_list = left(email_list,len(email_list)-1) end if
Response.Flush set data = dal.Table("").QueryAll() while not data.eof ' send the email rmail("to")=data("[color="#FF0000"]E-mail")
|
G
|
gonzalosb author 5/22/2014 |
More than 300 views and no one have a solution for this? |
![]() |
Sergey Kornilov admin 5/22/2014 |
Providing a solution just looking at your code is not possible. You have to run this code, check for errors, print some variables to see what is happening etc. |
G
|
gonzalosb author 6/13/2014 |
Here is the correct code to send if EmailSelected=1 Response.Flush set data = dal.Table("YourTable").Query(where,"EmailSelected=1") while not data.eof ' send the email rmail("to")=data("email") rmail("subject")="Sample subject" rmail("body")="Sample body" set result = runner_mail(rmail) ' if error happened print a message on the web page if not result("mailed") then response.write result("message") & " " response.flush end if data.MoveNext wend data.close: data=nothing
Response.Flush set data = dal.Table("YourTable").Query(where,"EmailSelected=1") while not data.eof data.MoveNext wend data.close: data=nothing ' send the email rmail("to")=data("email") rmail("subject")="Sample subject" rmail("body")="Sample body" set result = runner_mail(rmail) ' if error happened print a message on the web page if not result("mailed") then response.write result("message") & " " response.flush end if
|