" /> send an email from voice strategy - Genesys CTI User Forum

Author Topic: send an email from voice strategy  (Read 6311 times)

Offline Reinoud de Lange

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
send an email from voice strategy
« on: May 20, 2009, 04:56:19 AM »
Advertisement
Hi,

does anybody know how to send an email from an originally voice strategy?

I'm using IRD 7 and ICS 6.5.

I'm trying to send for ex. a standard response after I get a voice call. I want to use the caller's phonenumber and send this by email to a email recipient (not an agent).


Thanks in advance!

Offline catanirex

  • Sr. Member
  • ****
  • Posts: 272
  • Karma: 11
Re: send an email from voice strategy
« Reply #1 on: May 20, 2009, 05:39:44 AM »
Not possible with ICS 6.5. You must have an incoming email in order to send an acknowledgment.

But with Multimedia 7.5/7.6 you can create new outgoing email from for example voice strategy. There are separate IRD block Create Email for that.

Offline Dionysis

  • Sr. Member
  • ****
  • Posts: 408
  • Karma: 8
Re: send an email from voice strategy
« Reply #2 on: May 20, 2009, 06:20:02 AM »
You can't do it with ICS, however you should be able to do it using either a database write and trigger to generate email from SQL Server, or using a web service / custom server call to generate the email.

:)

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: send an email from voice strategy
« Reply #3 on: May 20, 2009, 07:00:41 AM »
Create a SP in the DB and then invoque it from Genesys, you can pass as parameters some data using SP execution methods.

Offline Reinoud de Lange

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: send an email from voice strategy
« Reply #4 on: May 20, 2009, 03:36:38 PM »
[quote author=cavagnaro link=topic=4222.msg18780#msg18780 date=1242802841]
Create a SP in the DB and then invoque it from Genesys, you can pass as parameters some data using SP execution methods.
[/quote]

Do you have an example for this SP? Do I need something sspecial in my DB? Will this also work from MSDE?

Thanks in advance!

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: send an email from voice strategy
« Reply #5 on: May 20, 2009, 05:56:13 PM »
I found this on Internet:

[quote]
Declare @resultcode int

EXEC @resultcode = sp_OACreate 'SMTPsvg.Mailer', @oMail OUT

if @resultcode = 0
BEGIN
EXEC @resultcode = sp_OASetProperty @oMail, 'RemoteHost', @mailserver
EXEC @resultcode = sp_OASetProperty @oMail, 'FromName', @SenderName
EXEC @resultcode = sp_OASetProperty @oMail, 'FromAddress', @SenderAddress

EXEC @resultcode = sp_OAMethod @oMail, 'AddRecipient', NULL, @RecipientName, @RecipientAddress

EXEC @resultcode = sp_OASetProperty @oMail, 'Subject', @Subject
EXEC @resultcode = sp_OASetProperty @oMail, 'BodyText', @Body


EXEC @resultcode = sp_OAMethod @oMail, 'SendMail', NULL

EXEC sp_OADestroy @oMail
END


SET nocount off
GO
[/quote]

Forgot to mention that you need to install a little Activex for this to work

http://www.sqlteam.com/article/sending-smtp-mail-using-a-stored-procedure
« Last Edit: May 20, 2009, 09:54:23 PM by cavagnaro »

Offline SisB

  • Jr. Member
  • **
  • Posts: 60
  • Karma: 0
Re: send an email from voice strategy
« Reply #6 on: May 20, 2009, 09:19:39 PM »
Just an option: SCS alarm reaction could be used.

Offline Reinoud de Lange

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: send an email from voice strategy
« Reply #7 on: May 23, 2009, 11:01:28 PM »
[quote author=cavagnaro link=topic=4222.msg18796#msg18796 date=1242842173]
I found this on Internet:

[quote]
Declare @resultcode int

EXEC @resultcode = sp_OACreate 'SMTPsvg.Mailer', @oMail OUT

if @resultcode = 0
BEGIN
EXEC @resultcode = sp_OASetProperty @oMail, 'RemoteHost', @mailserver
EXEC @resultcode = sp_OASetProperty @oMail, 'FromName', @SenderName
EXEC @resultcode = sp_OASetProperty @oMail, 'FromAddress', @SenderAddress

EXEC @resultcode = sp_OAMethod @oMail, 'AddRecipient', NULL, @RecipientName, @RecipientAddress

EXEC @resultcode = sp_OASetProperty @oMail, 'Subject', @Subject
EXEC @resultcode = sp_OASetProperty @oMail, 'BodyText', @Body


EXEC @resultcode = sp_OAMethod @oMail, 'SendMail', NULL

EXEC sp_OADestroy @oMail
END


SET nocount off
GO
[/quote]

Forgot to mention that you need to install a little Activex for this to work

http://www.sqlteam.com/article/sending-smtp-mail-using-a-stored-procedure
[/quote]

Many thanks!

Offline victor

  • Administrator
  • Hero Member
  • *****
  • Posts: 1419
  • Karma: 18
Re: send an email from voice strategy
« Reply #8 on: May 27, 2009, 08:10:43 AM »
I don't like to install other ActiveX objects and rely on CDONTS (CDONSYS in W2003+) to do this the native style:
[code]

CREATE PROCEDURE [dbo].[sp_send_cdontsmail]
@From varchar(100),
@To varchar(100),
@Subject varchar(100),
@Body varchar(4000),
@CC varchar(100) = null,
@BCC varchar(100) = null
AS
Declare @MailID int
Declare @hr int
EXEC @hr = sp_OACreate 'CDONTS.NewMail', @MailID OUT
EXEC @hr = sp_OASetProperty @MailID, 'From',@From
EXEC @hr = sp_OASetProperty @MailID, 'Body', @Body
EXEC @hr = sp_OASetProperty @MailID, 'BCC',@BCC
EXEC @hr = sp_OASetProperty @MailID, 'CC', @CC
EXEC @hr = sp_OASetProperty @MailID, 'Subject', @Subject
EXEC @hr = sp_OASetProperty @MailID, 'To', @To
EXEC @hr = sp_OAMethod @MailID, 'Send', NULL
EXEC @hr = sp_OADestroy @MailID
[/code]

And then just call this procedure:
[code]
exec sp_send_cdontsmail 'Pavel@Pavelowen.com','Pavel.owen@gmail.com','IMPORTANT MESSAGE','Tony Tillyer is a member of NAMBLA '
[/code]

Works the best for me :)