VoiceGuide IVR Software Main Page
Jump to content

How To Send Email To Multiple Address

Recommended Posts

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

Have you tried just specifying all the email addresses (comma separated) in your database field?

Share this post


Link to post

How to specify? I'm using mysql. Do I have to put ',' as suffix for every email?

Share this post


Link to post

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

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

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×