Exchange邮箱搭建
出现的问题:
这个问题
需要设置可以通过指定邮件服务器进行relay的ip地址
smtp->properties->access->relay
add the ip address
public bool Send(string to, string from, string subject, string message)
{
try
{
MailMessage em = new MailMessage();
em.To = to;
em.From = from;
em.Subject = subject;
em.Body = message; //Found out how to send authenticated email via System.Web.Mail at http://SystemWebMail.com (fact 3.8)
if(this.UserName != null && this.Password != null)
{
em.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); //basic authentication
em.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", this.UserName); //set your username here
em.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", this.Password); //set your password here
} SmtpMail.SmtpServer = this.SmtpServer;
SmtpMail.Send(em);
return true;
}
catch
{
return false;
}
} }
}
Exchange邮箱搭建:
Exchange邮箱搭建的更多相关文章
- sed,n,N,d,D,p,P,h,H,g,G,x,解析
原文地址 这篇文章主要是我参考命令的,直接复制粘贴,有问题请拍砖 A. sed执行模板=sed '模式{命令1;命令2}' 即逐行读入模式空间,执行命令,最后输出打印出来 B. p打印当前模式空间所有 ...
- 【转】sed命令n,N,d,D,p,P,h,H,g,G,x解析
1. sed执行模板=sed '模式{命令1;命令2}' 即逐行读入模式空间,执行命令,最后输出打印出来 2. 为方便下面,先说下p和P,p打印当前模式空间内容,追加到默认输出之后,P打印当前模式空间 ...
- sed命令n,N,d,D,p,P,h,H,g,G,x解析
1.sed执行模板=sed '模式{命令1;命令2}'即逐行读入模式空间,执行命令,最后输出打印出来2.为方便下面,先说下p和P,p打印当前模式空间内容,追加到默认输出之后,P打印当前模式空间开端至\ ...
- Sed命令n,N,d,D,p,P,h,H,g,G,x解析3
摘自:https://blog.csdn.net/WMSOK/article/details/78463199 Sed命令n,N,d,D,p,P,h,H,g,G,x解析 2017年11月06日 23: ...
- sed命令n,N,d,D,p,P,h,H,g,G,x解析2
摘自: https://blog.csdn.net/xiexingshishu/article/details/50514132 sed命令n,N,d,D,p,P,h,H,g,G,x解析 2016年0 ...
- g++编译总结
g++编译&&gdb调试&&coredump调试 一.编译注意细节 1.使用g++编译CPP文件如果用gcc编译C++源文件时,加以下选项:-lstdc++,否则使用了 ...
- H.264 White Paper学习笔记(二)帧内预测
为什么要有帧内预测?因为一般来说,对于一幅图像,相邻的两个像素的亮度和色度值之间经常是比较接近的,也就是颜色是逐渐变化的,不会一下子突变成完全不一样的颜色.而进行视频编码,目的就是利用这个相关性,来进 ...
- g++多文件编译
头文件:A.h void test(); 源文件:A.cpp #include <iostream> #include<thread> #include<chrono&g ...
- Educational Codeforces Round 46 (Div 2) (A~G)
目录 Codeforces 1000 A.Codehorses T-shirts B.Light It Up C.Covered Points Count(差分) D.Yet Another Prob ...
随机推荐
- Solr 6.7学习笔记(03)-- 样例配置文件 solrconfig.xml
位于:${solr.home}\example\techproducts\solr\techproducts\conf\solrconfig.xml <?xml version="1. ...
- 洛谷P1313 计算系数
P1313 计算系数 题目描述 给定一个多项式(by+ax)^k,请求出多项式展开后x^n*y^m 项的系数. 输入输出格式 输入格式: 输入文件名为factor.in. 共一行,包含5 个整数,分别 ...
- docker网络设置(待整理)
手动指定容器的配置 -h HOSTNAME or --hostname=HOSTNAME \\设定容器的主机名. --dns=IP_ADDRESS \\指定DNS地址. ...
- github最火的springboot开源学习资料
https://github.com/JeffLi1993/springboot-learning-example https://github.com/ityouknow/spring-boot-e ...
- linux查看系统版本(适用于centos、ubutun,其他类型没有进行测试)
方法一:cat /etc/issue 或more /etc/issue root@salt-master:~# cat /etc/issueUbuntu 16.04.2 LTS \n \l 方法二:l ...
- plsql过期注册
Product Code:4t46t6vydkvsxekkvf3fjnpzy5wbuhphqzserial Number:601769password:xs374ca 打开plsql工具 点击注册即可
- Angular2中实现基于TypeScript的对象合并方法:extend()
TypeScript里面没有现成的合并对象的方法,这里借鉴jQuery里的$.extend()方法.写了一个TypeScript的对象合并方法,使用方法和jQuery一样. 部分代码和jQuery代码 ...
- enable assembly bind failure logging (Fusion) in .NET
今天遇到新建wcf项目编译成64位版本在64位windows上无法运气的,问题 先百度了一下如何查看程序集加载日志: Add the following values to HKEY_LOCAL_MA ...
- jeecg308自定义使用getDataGridReturn方法分页失效问题
DataGrid dataGrid = new DataGrid(); dataGrid.setPage(p); dataGrid.setRows(r); dataGrid.setOrder(&quo ...
- linux-2.6.22.6/Makefile:416: *** mixed implicit and normal rules: deprecated syntax
今天在按照韦东山大哥的教程流程编译内核的时候出现了这个问题 linux-2.6.22.6/Makefile:416: *** mixed implicit and normal rules: ...