元生康SCRM系统博客
元生康SCRM系统包含了:CRM、OA、微信V3支付、考试、学院百科、财务、推广、CMS、代理加盟、抽奖、积分、现金券、在线充值活动、及时语音转化技术子系统等

ASP微信公众号(服务号)发送纯文本信息给客户(类似微信聊天),下面直接上代码:

 1 <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
 2 <!DOCTYPE html>
 3 <html>
 4 <head>
 5   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 6   <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
 7   <title>发送微信消息(只能是已经关注公众号的客户)</title>
 8 </head>
 9 <body>
10 <%
11  On Error Resume Next
12   
13  Dim WxObj
14  Set WxObj = Server.CreateObject("WeixinDLL.WeixinClass")
15  WxObj.SetAppID      = AppID
16  WxObj.SetAppSecret  = AppSecret
17  
18  Dim token,u_text:u_text="曾先生您好,您在我司下单的三盒元森美水果酵素,已经发货,亲记得保持电话通畅,方便快递员及时派件联系。元森美祝您健康幸福!"
19  token = WxObj.Get_Token() ' 当前用户的access_token
20  If Trim(token) = "" Or IsNull(token) Then Response.Write "没有获取到有效的access_token,导致模板消息发送失败!" : Response.End()
21   
22  Dim pJson
23  pJson = WxObj.WxSend(OpenID, token, u_text)
24  Response.Write pJson
25 
26  Set WxObj = Nothing
27  If Err Then Response.Write Err.Description
28 %>
29 </body>
30 </html>

本处用到了WeixinDLL组件,有需要的朋友可以加微信:z18670092211 获取!

posted on 2021-05-04 10:51  元森美  阅读(417)  评论(0)    收藏  举报