当前位置: 首页 > news >正文

网站上的图片多大合适推广赚钱的软件有哪些

网站上的图片多大合适,推广赚钱的软件有哪些,昆山网站开发公司,网站优化 西安一、背景说明 在已有的项目中#xff0c;已经获取到了Graph的AccessToken并保存在内存里面。所以不希望再通过client secret或者certificate去创建GraphServiceClient对象。希望使用现有的token字符串来创建初始化创建GraphServiceClient从而来实现Graph其他API功能。 二、具体…一、背景说明 在已有的项目中已经获取到了Graph的AccessToken并保存在内存里面。所以不希望再通过client secret或者certificate去创建GraphServiceClient对象。希望使用现有的token字符串来创建初始化创建GraphServiceClient从而来实现Graph其他API功能。 二、具体实现 2.1 需要Java Graph SDK依赖 加入到pom.xml文件内 !-- Microsoft Graph SDK for Java --dependencygroupIdcom.microsoft.graph/groupIdartifactIdmicrosoft-graph/artifactIdversion[5.0,)/version/dependency!-- Azure AD Authentication SDK for Java --dependencygroupIdcom.azure/groupIdartifactIdazure-identity/artifactIdversion[1.3,)/version/dependency 2.2 代码片段 public static GraphServiceClient initGraphServiceClient() {IAuthenticationProvider authProvider new IAuthenticationProvider() {Overridepublic CompletableFutureString getAuthorizationTokenAsync(URL requestUrl) {CompletableFutureString future new CompletableFuture();future.complete(Your_AccessToken);return future;}};return GraphServiceClient.builder().authenticationProvider(authProvider).buildClient();} 三、测试 下面代码是实现调用创建GraphServiceClient调用graph api发送带附件的邮件。 public static String sendMail() {try {String mfrom xxxxoutlook.com;String to xxxxoutlook.com;GraphServiceClientRequest graphClient initGraphServiceClient();Message message new Message();message.subject Meet for lunch?;ItemBody body new ItemBody();body.contentType BodyType.TEXT;body.content The new cafeteria is open.;message.body body;LinkedListRecipient toRecipientsList new LinkedListRecipient();Recipient toRecipients new Recipient();EmailAddress emailAddress new EmailAddress();emailAddress.address to;toRecipients.emailAddress emailAddress;toRecipientsList.add(toRecipients);message.toRecipients toRecipientsList;// 构建附件LinkedListAttachment attachmentsList new LinkedListAttachment();FileAttachment attachments new FileAttachment();attachments.name hello word.txt;attachments.oDataType #microsoft.graph.fileAttachment;attachments.contentType text/plain;attachments.contentBytes Base64.getDecoder().decode(SGVsbG8gV29ybGQh);attachmentsList.add(attachments);AttachmentCollectionResponse attachmentCollectionResponse new AttachmentCollectionResponse();attachmentCollectionResponse.value attachmentsList;AttachmentCollectionPage attachmentCollectionPage new AttachmentCollectionPage(attachmentCollectionResponse, null);message.attachments attachmentCollectionPage;// 以指定用户邮箱发送邮件graphClient.users(mfrom).sendMail(UserSendMailParameterSet.newBuilder().withMessage(message).withSaveToSentItems(true).build()).buildRequest().post();log.info(send email success);return success;} catch (Exception e) {e.printStackTrace();log.error(send email error : {}, e.getMessage());return e.getMessage();}}
http://www.hkea.cn/news/14429243/

相关文章:

  • 网站公司做的比较好wordpress搜索400
  • 外贸网站建站赚钱网页制作的视频教程
  • 做网站卖产品要注册公司吗做网站会用到的代码单词
  • 淮北做网站的公司湖口网站建设
  • 慈溪做网站公司哪家好网站网页设计方案
  • apmserv 设置网站目录江门微信网站建设
  • 南宁横县网站建设推广wordpress悬浮联系表
  • 建设厅网站合同备案在哪里企业营销型网站规划
  • 团购网站及域名php网站建设一流程
  • 网站内链 工具关键词排名手机优化软件
  • 课桌公司网站建设wap网站建设学什么
  • 信阳网站建设找汉狮wordpress的分类id
  • 电子商务网站建设的方法有哪些方面做网站需要理解什么
  • 平面设计网站灵感wordpress获取附件
  • 网站的导航栏设计文本网站建设及优化方案
  • 电商是什么?一般是干嘛的seo搜索引擎优化是什么意思
  • 网站绝对布局铜铜铜铜铜铜铜铜好大好深色
  • 怎么查看网站快照微信网站制作系统
  • 惠州企业自助建站深圳有哪些招聘网站
  • 顺德建设网站wordpress匿名评论插件
  • 卓训网是个什么网站南宁经典网站建设
  • 网站建设有哪些推广渠道wordpress主题添加右边栏
  • 如何做二手车网站济南市住建局官网
  • 如何做个购物网站浦口区网站建设技术指导
  • 江苏省建设人才网站长春网站设计长春网络推广
  • 建网站能多少带宽钢材技术支持东莞网站建设
  • 网站建设自学教程搭建网页游戏教程
  • 怎么在国外建网站网站做成软件
  • 石龙网站开发广州建设工程造价信息网
  • 网站开发浏览器包dw网页制作完成后如何保存