Web.config中使用如下配置 使用localhost直接发送邮件。在服务器上部署遇到异常:Mailbox unavailable. The server response was: 5.7.1 Unable to relay for info@site.com需要配置IIS...
分类:
其他好文 时间:
2014-12-04 21:28:46
阅读次数:
199
引言我已经很久没有写过博客了,以前在博客园有写过一段时间,但后来因为工作的原因,没有更多的时间来写博客。这是我在51cto上的第一篇博文,写写JavaEmail发送邮件吧。准备工作下载好:javaMail.jar包和commons-lang-x.x.jar(后面附件中,我会把包一并送上,commons-lang因为在..
分类:
编程语言 时间:
2014-12-03 19:38:39
阅读次数:
309
最近工作中遇到使用脚本处理问题并发送结果邮件,使用python的smtp模块很简单的完成了实现。今天遇到一个问题,根据脚本的测试结果需要群发邮件,但是发送邮件的py文件只有首个地址收到了邮件。仔细排查发现个有意思的地方:发送邮件的py大致如下:1 def sendmail(message,to_ad...
分类:
编程语言 时间:
2014-12-03 00:19:07
阅读次数:
183
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Net.Mail;using System.Configuration;using System.Net;usi...
分类:
Web程序 时间:
2014-12-01 22:23:39
阅读次数:
226
测试代码
<?php
header('Content-Type: text/xml; charset=utf-8');
require_once('./PHPMailer-master/class.phpmailer.php');
function sendMail()
{
$mail = new PHPMailer();
//采用SMTP发送邮件
$mail-...
分类:
Web程序 时间:
2014-11-30 16:56:21
阅读次数:
198
一.先配置gitsend-mail的smtp服务器:1.安装git-email:#apt-getinstallgitgit-coregit-email修改gitconfig文件:vim~/.gitconfig[color]
ui=auto
[commit]
template=~/.commit_template
[user]
name=***
email=***@***.com
[alias]
pretty=log--branches--remotes--tags--grap..
分类:
其他好文 时间:
2014-11-28 18:37:46
阅读次数:
233
基于spring框架简单三步:导包配置XML接口调用xml配置:<?xmlversion="1.0"encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework...
分类:
编程语言 时间:
2014-11-28 18:31:43
阅读次数:
215
5台设备分布式处理30项任务,在30项任务全部处理完成时发送邮件通知,需要在最后一个任务完成时触发邮件发送动作,实现方式: 1、程序中实现,在程序中synchronized变量表示剩余任务数; 2、编写触发器?兼容多数...
分类:
其他好文 时间:
2014-11-28 12:51:06
阅读次数:
236
该功能网上一大批,就不说了。其中一点就是在测试时,出现好多问题。因为不明白原因,导致一头雾水,花费不少时间。实际上归结一条:你的网上邮箱pop3和smtp是否开通。没有开通时出现的形形式式的错误提示会一头雾水。现在一般邮箱要你自己手动开通。只有开通后才能测试成功。 1 begin 2 IdS...
分类:
其他好文 时间:
2014-11-27 20:15:25
阅读次数:
183