Author Topic: Pulse - Action - Send Email via Gmail  (Read 3773 times)

Offline zeonjoseph

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Pulse - Action - Send Email via Gmail
« on: November 26, 2018, 12:47:29 PM »
Hi

Previously we were using CC Pulse with Outlook and can could create an action to send an email post a threshold. We have now moved to gmail and I wanted to know if we can set up a script for CC Pulse to send this via gmail without saving the gmail authentication details for each user

Please do let me know if any more information will help

Cheers!!
Z

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7623
  • Karma: 56330
Re: Pulse - Action - Send Email via Gmail
« Reply #1 on: November 26, 2018, 08:34:35 PM »
Guess not as Gmail is a SMTP server which needs validation and any SMTP client need the credentials to access it.
Maybe what you can do is install SMTP Windows services, add Gmail as relay and store data there. But in CCPulse use your local SMTP server.
Talk with your Tech guys.

Offline szs5tim

  • Newbie
  • *
  • Posts: 46
  • Karma: 0
Re: Pulse - Action - Send Email via Gmail
« Reply #2 on: December 05, 2018, 05:58:06 PM »
You could use vbSendMail for this.
The DLL can be downloaded from here : http://www.freevbcode.com/ShowCode.asp?ID=109
Create an action that is triggered by the threshold and the email will be sent.

Here is an example action vb script in CCPulse I used way back to send an email to the agent and superior if the follow-up threshold is breached by the agent.
The agent's email address was queried out from the CFG DB using the employee id.

Dim msgBody
Dim thresholdInfo
dim conn
dim rs
dim strEmpl
dim query
dim oconn
dim res

conn = "Provider=SQLOLEDB.1;Data Source=IP_here;Initial Catalog=DB_name_here;user id =DB_user_here;password=DB_password_here"
strEmpl = CStr(Threshold.CFGObjectID)
query = "select first_name, last_name, address_line4 from cfg_person "&_
          "where employee_id='"+strEmpl+"'"

set oconn = CreateObject("ADODB.Connection")
set rs = CreateObject("ADODB.Recordset")
oconn.open conn
rs.open query,oconn

if Now > CDate ("14/1/2016 10:07:00") then
res = rs("address_line4")
else
res = "email_address_fallback"
end if

   msgBody="You have breached the maximum follow-up limit"+vbNewLine
   thresholdInfo=+vbNewLine+"Agent:"+res+vbNewLine+"Status Name:"+CStr(Threshold.StatAlias)+vbNewLine+ "Duration:"+CStr(Threshold.StatValue)+" seconds"   
Set poSendMail = CreateObject("vbSendMail.clsSendMail")
poSendMail.SMTPHost = ""
poSendMail.UserName = ""
poSendMail.Password = ""
poSendMail.From = "
poSendMail.FromDisplayName = "CCPulse Notifications"
poSendMail.Recipient = res
poSendMail.CcRecipient = ""
poSendMail.RecipientDisplayName = ""
poSendMail.ReplyToAddress = ""
poSendMail.Subject = "Follow-up alert: "+res
poSendMail.Attachment = ""
poSendMail.Message = msgBody+   thresholdInfo
poSendMail.Send
Set poSendMail = Nothing

rs.Close
rs = null