Unable to read the Content of Email Automation Anywhere - automation

I am reading the incoming mails from a outlook mailbox using automation anywhere Email Automation - Get All Messages menu. My simple code is given below. But everytime I am getting html objects and tags printing in the message box, I want only the email message.
Start Loop "Each message on server:outlook.office.365.com,User Name:xyz#xyz.com,SSL Server Type:POP3,Message Format:Plain Text"
Message Box:"$Email Message$"
Can anyone help????

In your original Email Automation - Get All Messages command, there should be a "Message Format" option below port number.
If not - you could offload to a javascript script that might look like this and call it via Run Script:
function noTags(vString) {
return vString.replace(/<(.|\n)*?>/g, '');
}
Passing vString into it and getting vString back out, now without the tags.

Related

Get message and use it Telegram bot (pyTelegramBotAPI)

I am making a Telegram bot. I want write code that:
user send command - /color
bot ask β€˜Red: β€˜
user send text
How can I get that message without β€˜/’ ?
#bot.message_handler(commands=['color'])
def info_produkts(message):
bot.send_message(message.chat.id, "Red: ")
text = Update.message.replay_text()
But it's not working...
I am working in visual studio code.
use regexp= keyboard like that
`#bot.message_handler(regexp='color')

How to use Pushbullet API on mikrotik using fetch tool?

I need mikrotik to send me a notification via Pushbullet if there is a certain event using fetch
i find some code to work with it, but it send me an error, i read on the website about the error code, it says my token was invalid, i tried to create multiple token, but no luck
/tool fetch mode=https url="https://api.pushbullet.com/api/pushes" http-method=post http-data="device_iden=&type=note&body=High priority message from MikroTik device&title=RouterOS Alert" user=""
i expected the code to send the notification, but i get <401 unauthorized> instead
Correct syntax with Pushbullet:
/tool fetch mode=https url="https://api.pushbullet.com/v2/pushes" http-method=post http-data="type=note&body=some text" user="API-Token"
On a specific device:
/tool fetch mode=https url="https://api.pushbullet.com/v2/pushes" http-method=post http-data="device_iden=<device_id>&type=note&body=some text" user="API-Token"

wfNotify in IDOC to send mail | csScriptMustBeInWorkflowContext

I have created & called a custom service in my custom template to send mails to users when document gets sent/reject/approve. I want to copy myself in BCC in these mails so that in case of any issues, i could cross check. is there a way i can enter a specific mail address in this code. below is the code i 'm using. Will "wfNotify" be of any help?
code used
<$executeService("APPROVAL_MAIL_PILOT_USERS")$>
<$loop IS_PILOT_USER$>
<$userValue=IS_PILOT_USER.USEREXISTS$>
<$endloop$>
<$if strEqualsIgnoreCase(userValue,"1")$>
----MailFormat----
P.S- when i use wfNotify -> , i get the error
Caused by: intradoc.common.ServiceException: !csScriptMustBeInWorkflowContext,wfNotify
*ScriptStack !csDynHTMLStackDumpStart,pbhati,(datasummary)IdcService=WORKFLOW_SENDTO\,dDocName=D_1247583\,dID=1421894!$
!csDynHTMLNoStack!$
!csDynHTMLErrorMessage,/u01/Oracle/Middleware/user_projects/domains/base_domain/ucm/cs/custom/Workflow/templates/Workflow_reviewer_mail.htm,44,3!csDynHTMLReportMsgFunction,wfNotify!$
-><$wfNotify(xDocOwner,"user")$>
As far as I know, wfNotify can only be called from inside a workflow event which is why you are receiving the csScriptMustBeInWorkflowContext error.
As to a service or Idoc Script function (besides wfNotify) that can be used to send an email to a specific user/alias/token and use a custom template, I could not locate one.
You could create your own scriptable service (which you can then call from Idoc Script) or an Idoc Script function that would allow for this.
You can call wfNotify with the specific username.
But the user must have their email details completed in the user table.
Your second error with the wfNotify call - are you calling wfNotify with a 3rd param for the template?
If so - eliminate this as a source of your problem by just calling wfNotify with the first two params.
wfNotify Oracle Documentation

Debugging K2 workflow - how to view data associated with error conditions?

I have a K2 Blackpearl workflow. In the workflow I populate a process data field with email addresses pulled from a SharePoint list. Using the Text - Join function with the SP List's SmartObject's GetList method for the values and a semi-colon for the separator.
In theory, this should produce a well-formatted string with multiple addresses for the "To" line of the E-mail event. However, I keep receiving a "The specified string is not in the form required for an e-mail address." at the point where the workflow should attempt to send an email.
I've tried using the string "john.doe#company.com;jane.dove#company.com;abc.def#company.com" directly and I've tried splitting the string on the semi-colons in the Activity's destination set. In the first case, there is one instance trying to send the email. In the second instance, the emails are resolved to users and though I select the "ActivityInstanceDestUserEmail" for the "To" line, I still get the error message.
We are using K2 Blackpearl 4.6 with a SharePoint 2010 farm configured strictly for Claims authentication. The users to which I wish to send the email have valid email addresses if resolved using the K2SPS provider, but when the emails are resolved into destination slots, they are resolved into accounts with the K2 provider. I'm guessing that this is the problem with my second method for sending the email. But the first, putting the whole string in the "To" line should have worked it is straight email addresses - no resolving to users is needed.
What am I doing wrong? Is there another way to accomplish this?
Changes in the configuration of our customer security provider, labelled "K2SPS" seem to have resolved the problem - at least for now.

How to check email using a vb.net application

I am looking for a vb.net code for receiving e-mails without using any 3rd party libraries. I want to check Unread messages, Inbox and Sent messages. A Working sample is appreciated.
What is the default port for SMTP , is it port 25 (is it the same for all SMTP mail servers?). Which is more flexible in my case POP3 or IMAP ?
Edit:
Someone please give me a sample working code for receiving mail using lumisoft (pop) in vb.net
From lumisoft Help.
/*
To make this code to work, you need to import following namespaces:
using LumiSoft.Net.Mime;
using LumiSoft.Net.POP3.Client;
*/
using(POP3_Client c = new POP3_Client()){
c.Connect("ivx",WellKnownPorts.POP3);
c.Authenticate("test","test",true);
// Get first message if there is any
if(c.Messages.Count > 0){
// Do your suff
// Parse message
Mime m = Mime.Parse(c.Messages[0].MessageToByte());
string from = m.MainEntity.From;
string subject = m.MainEntity.Subject;
// ...
}
}
Pop is more supported and most servers have it on if you want to implement your own pop service a good place to start is the rfc.