Guest channel Report post Posted 01/30/2005 01:41 AM Hi, I try to send email to our customers with voiceguide Send Email module. The email address are retreived by Database Query. How do I seperate the different email address with comma in data query result. Thanks for your help Share this post Link to post
SupportTeam Report post Posted 01/30/2005 04:11 AM Have you tried just specifying all the email addresses (comma separated) in your database field? Share this post Link to post
Guest Guest_channel Report post Posted 01/30/2005 04:18 PM How to specify? I'm using mysql. Do I have to put ',' as suffix for every email? Share this post Link to post
Guest channel Report post Posted 01/31/2005 04:50 AM It doesn't seem to work for me. Here's the log file log.txt Share this post Link to post
SupportTeam Report post Posted 01/31/2005 05:35 AM I see from the log file that the SQL query is returning multiple rows. If you want to send email to each of the addresses returned in then you must specify a Result Variable for each of the rows returned... In your case you should have this specified in the 'Destination' field: $RV[order query_1_1],$RV[order query_1_2] if you expect more the two rows to be returned then additional RV's need to be specified. You may want to read up on the Help file's entry on the DB Query module: http://www.voiceguide.com/vghelp/html/modDbQuery.htm If many rows can be returned you may want to have a short VBScript which iterates through the data $RV[order query_RowCount] times, adding each $RV[order query_1_X] in turn to a comma delimited string - saving that in a new $RV, and then using this new $RV in the Send Email module. Share this post Link to post
Guest channel Report post Posted 02/01/2005 12:40 AM Yes, Thant's what I want. But I know nothing about VBscripts. If it is a simple short scripts. Can you post it here. I appreciate your help. Thanks Share this post Link to post
SupportTeam Report post Posted 02/01/2005 01:44 AM Something like this: set vg = CreateObject("VoiceGuide.CommandLink") for i = 1 to $RV[order query_RowCount] strRv = "RV[order query_1_" & i & "]" strEmailAddr = vg.RvGet($RV_LINEID, strRv) strOut = strOut & strEmailAddr & "," next vg.Run_ResultReturn $RV_LINEID, "[EmailAdresses]{" & strOut & "}" set vg = Nothing Then use: $RV[EmailAdresses] in the Send Email module... The trailing comma should not cause any problems. Share this post Link to post
Guest channel Report post Posted 02/01/2005 03:26 AM It still doesn't go through. The customer don't get the email. Anything wrong? See the log file please. order.txt Share this post Link to post
SupportTeam Report post Posted 02/01/2005 04:05 AM Trace shows that the email addresses were correctly saved into the database storing the emails queued to be sent out by the Email Sender applet, and that both email addresses were correctly included: 102406.50 0 RVreplace end: [ytnpa@yahoo.com,service@videoexpress.ca,] 102406.53 0 rv add [send Email 128]{ytnpa@yahoo.com,service@videoexpress.ca,} 102406.53 0 rv add [send Email 128_Subject]{Your order has been delivered} 102406.55 0 rv add [send Email 128_Message]{Your order has been delivered to the store at} ... 102406.59 0 email que to: ytnpa@yahoo.com,service@videoexpress.ca, 102406.63 0 rv add [send Email 128_SendResult]{OK} You may want to now look in the MMDDes.txt log file in VG's /log/ subdirectory - that log file traces how the Email Sender task connects to the SMTP server to forward the email and if there were any errors connecting to the email server... Share this post Link to post