javascript 入站操作 - 处理和处理入站电子邮件
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了javascript 入站操作 - 处理和处理入站电子邮件相关的知识,希望对你有一定的参考价值。
/** Process Inbound emails with approve or reject in them */
if(email.subject.toLowerCase().indexOf("approve") >= 0)
{
current.comments = "Request Approved \n" +"Reply from: " + email.origemail + "\n" + email.body_text;
var gr_appr = new GlideRecord("sysapproval_approver");
gr_appr.addQuery("sysapproval", current.sys_id);
gr_appr.addQuery("state", "requested");
gr_appr.query();
if(gr_appr.next())
{
gr_appr.state = "approved";
gr_appr.comments = email.body_text;
gr_appr.update();
}
}
else if(email.subject.toLowerCase().indexOf("reject") >= 0)
{
current.comments = "Request Rejected \n" +"Reply from: " + email.origemail + "\n" + email.body_text;
var gr_appr = new GlideRecord("sysapproval_approver");
gr_appr.addQuery("sysapproval", current.sys_id);
gr_appr.addQuery("state", "requested");
gr_appr.query();
if(gr_appr.next())
{
gr_appr.state = "rejected";
gr_appr.comments = email.body_text;
gr_appr.update();
}
}
else{
current.comments = "Reply from: " + email.origemail + "\n" + email.body_text;
}
current.update();
以上是关于javascript 入站操作 - 处理和处理入站电子邮件的主要内容,如果未能解决你的问题,请参考以下文章
入站和出站机制
95-36-020-ChannelHandler-ChannelHandler
95-36-020-ChannelHandler-ChannelHandler
Netty核心技术及源码剖析-Netty入站与出站机制
95-33-020-ChannelHandler-ChannelHandler简介
AWS SES S3 处理入站电子邮件