#!/usr/bin/perl -w
use strict;
use Mail::Sender; my $count = ;
while(){
my $sender = Mail::Sender->new({
smtp => 'smtp.163.com',
#这里以163为例
from => '这里写你的163邮箱地址:username@163.com',
auth => 'LOGIN',
authid => '这里写你的163邮箱用户名:username',
authpwd => '这里写你的邮箱密码:password'}
) or die "Cannot send mail:$!\n"; my $messages = 'hello这里是要发送的内容'; $sender->MailMsg({
to => '要发送到哪个邮箱:test@qq.com',
subject => '邮箱标题',
msg => $messages}
);
$sender->Close();
print "第$count封发送完毕!\n";
$count++;
}

这里用了一个while(1)测试一直发送
perl默认没有安装Mail::Sender模块, 要自行安装

perl Mail::Sender模块发送邮件的更多相关文章

  1. Perl 脚本报Can't locate Mail/Sender.pm 解决办法

        在新的Linux Server(Red Hat Enterprise Linux Server release 5.7 (Tikanga))上配置磁盘空间告警的perl脚本后,测试时报如下错误 ...

  2. python:利用smtplib模块发送邮件详解

    自动化测试中,测试报告一般都需要发送给相关的人员,比较有效的一个方法是每次执行完测试用例后,将测试报告(HTML.截图.附件)通过邮件方式发送. 首先我们要做: 进入163邮箱,点击设置中的pop3/ ...

  3. 利用System.Net.Mail 的SmtpClient发送邮件

    原文:利用System.Net.Mail 的SmtpClient发送邮件 几个月前总结过关于Jmail发送邮件,当时用Jmail发送邮件发送速度有点慢(可能对Jmail了解不是很多).现在改为用微软提 ...

  4. python之使用smtplib模块发送邮件

    # 使用smtplib模块发送邮件 import smtplib from email.mime.text import MIMEText from email.header import Heade ...

  5. python之smtplib模块 发送邮件

    # -*- coding: utf-8 -*- #python 27 #xiaodeng #smtplib模块 发送邮件 import smtplib from email.mime.text imp ...

  6. perl HTML::LinkExtor模块(1)

    use LWP::Simple; use HTML::LinkExtor; $html = get("http://www.baidu.com"); $link = HTML::L ...

  7. Perl的Expect模块学习

    Perl的Expect模块学习 http://www.xuebuyuan.com/1852717.html

  8. Python_使用smtplib和email模块发送邮件

    [http://blog.csdn.net/menglei8625/article/details/7721746] SMTP (Simple Mail Transfer Protocol) 邮件传送 ...

  9. python:利用smtplib模块发送邮件

    自动化测试中,测试报告一般都需要发送给相关的人员,比较有效的一个方法是每次执行完测试用例后,将测试报告(HTML.截图.附件)通过邮件方式发送. 参考代码:send_mail.py 一.python对 ...

随机推荐

  1. WCF服务承载

    WCF服务承载(笔记)   自托管(也做自承载) 承载 WCF 服务最灵活.最便捷的方法就是进行自承载.要能够自承载服务,必须满足两个条件.第一,需要 WCF 运行时:第二,需要可以承载 Servic ...

  2. Arduino live weather broadcasting 实时天气站

    Live broadcasting with arduino get a pc , make it run linux. make arduino catch the weather sensor a ...

  3. sql编程 && 存储过程

    sql  结构化查询语言      是一种编程语言   用于管理数据库的编程语言      元素:     数据      数据类型         变量的数据类型  就是字段的数据类型      变 ...

  4. [设计模式-创建型]工厂方法(Factory Method)

    概括 名称 Factory Method 结构 动机 定义一个用于创建对象的接口,让子类决定实例化哪一个类.Factory Method 使一个类的实例化延迟到其子类. 适用性 当一个类不知道它所必 ...

  5. Hexo+NextT基本设置【3】

    该系列博客列表请访问:http://www.cnblogs.com/penglei-it/category/934299.html 摘要      或许在你看到我这篇我文章之前,你已经成功的通过Git ...

  6. 分享下mac安装xamarin跨平台开发环境的坑

    之前在vs2015上安装好了xamarin环境,考虑到调试IOS仍然需要mac机,昨天决定直接在mac上安装xamarin. 安装完所有的效果如上图,此时已经可以创建安卓和IOS环境. 我安装过程中, ...

  7. 什么是MongoDB、特点、历史、下载和工具

    什么是MongoDB ?MongoDB 是由C++语言编写的,是一个基于分布式文件存储的开源数据库系统.在高负载的情况下,添加更多的节点,可以保证服务器性能.MongoDB 旨在为WEB应用提供可扩展 ...

  8. Windows下载地址

    文件名 cn_windows_7_professional_with_sp1_x64_dvd_u_677031.iso SHA1 9B57E67888434C24DD683968A3CE2C72755 ...

  9. perl的列表(List)和数组(Array)

    If a scalar is the "singular" in Perl, as we described it at the beginning of Chapter 2, t ...

  10. winServer2008下安装SqlServer2008数据库

    1 安装文件包 文件名 cn_sql_server_2008_r2_enterprise_x86_x64_ia64_dvd_522233.iso SHA1 0EEFF017B21635DF33F33C ...