Send Email
This module
will send an Email message.
You can
specify the Destination, Title, Message Body and an Attachment
File. Result Variables
can be
used.
Example:
If the
message needs to be sent to multiple email addresses the individual
addresses must be separated by semicolons ";" or commas
",". Other information may be
set in the Misc tab, including return email address, CC,
BCC.
The two Send
Method tabs specify which SMTP servers (primary and backup) the
email should be sent through (or if MAPI should be
used).
Please note
that many SMTP gateways require that you specify a valid return
email address before they will accept and send the
email.
If MAPI option
is selected then Microsoft Outlook (full version, not 'Outlook
Express') or MS Exchange or MS Messaging must be installed and
running on the system and acting as MAPI servers. Pleae note that
recent security updates issued by Microsoft disable sending emails
via MAPI. This is why sending emails direct through an SMTP server
is the preferred choice on most systems.
If the email
was queued to be sent OK then the Success path will be taken. If
there were problems with queuing the email then the Fail path will
be taken:
What the
above paths do:
|
On {Success} Goto
[Confirm Email Sent]
|
Go to module called 'Confirm Email
Sent'
|
|
On {Fail} Goto [Say
Error]
|
Go to module called 'Say
Error'
|
Result
Variables
The following
Result Variables are created by this module:
$RV[module
title]
Will store
the destination email address.
$RV[module
title_Subject]
Will store
the email message subject.
$RV[module
title_Message]
Will store
the email message body text.
$RV[module
title_Attachment]
Will store
the filename of the attached file sent.
$RV[module
title_SendResult]
Will store
whether sending of the email was successful or not. Stores 'OK' if
the message was sent, or stores an error code if the message could
not be sent. An error code of 3 means that Microsoft
Outlook/Exchange/Messaging was not running at the time.
Advanced
The Send Email module inserts
details of the message to be sent into the database EmailQue.mdb in
VoiceGuide's \data\ subdirectory. This allows other applications or
VBScripts to also send emails through VoiceGuide by just inserting
an entry into this database.
Below is an example of a VBScript
which can be used to queue an email to be sent:
Set cnn =
CreateObject("ADODB.Connection")
cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program
Files\VoiceGuide\data\EmailQue.mdb"
cnn.Execute "INSERT INTO MyTable (ToAddress, ToName, ReturnAddress,
ReturnName, MsgSubject, MsgMessage, MsgAttachment, gw1_SmtpServ)
VALUES ('support@voiceguide.com', 'VoiceGuide Support',
'ivr@voiceguide.com', 'VoiceGuide IVR', 'This is a test email',
'Call received from $RV_CIDNUMBER', '',
'smtp.voiceguide.com');"
cnn.Close
Set cnn = Nothing