社区
下载资源悬赏专区
帖子详情
获取eml/txt文件中的email地址下载
weixin_39822095
2019-07-28 07:00:16
提取eml文件或txt文件中的电子邮件地址。
相关下载链接:
//download.csdn.net/download/qingchen1984/3952772?utm_source=bbsseo
...全文
69
回复
打赏
收藏
获取eml/txt文件中的email地址下载
提取eml文件或txt文件中的电子邮件地址。 相关下载链接://download.csdn.net/download/qingchen1984/3952772?utm_source=bbsseo
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
获取
eml
/
txt
文件
中
的
email
地址
提取
eml
文件
或
txt
文件
中
的电子邮件
地址
。
批量
eml
邮件
地址
提取工具
从指定目录下的所有.
eml
文件
中
获取
有效的邮件
地址
,包括从邮件头和邮件正文
中
搜索邮件
地址
。 智能识别邮件
地址
中
@符号的各种变种:#,&,at,*,&,#,@,at,AT,*等,让您省心省力,多快好省地找到邮箱
中
的所有邮件
地址
。原介绍网址:http://www.mygrep.com/mailer/index.htm
网管教程 从入门到精通软件篇.
txt
网管教程 从入门到精通软件篇 ★一。★详细的xp修复控制台命令和用法!!! 放入xp(2000)的光盘,安装时候选R,修复! Windows XP(包括 Windows 2000)的控制台命令是在系统出现一些意外情况下的一种非常有效的诊断和测试以及恢复系统功能的工具。小编的确一直都想把这方面的命令做个总结,这次辛苦老范给我们整理了这份实用的秘笈。 Bootcfg bootcfg 命令启动配置和故障恢复(对于大多数计算机,即 boot.ini
文件
)。 含有下列参数的 bootcfg 命令仅在使用故障恢复控制台时才可用。可在命令提示符下使用带有不同参数的 bootcfg 命令。 用法: bootcfg /default 设置默认引导项。 bootcfg /add 向引导列表
中
添加 Windows 安装。 bootcfg /rebuild 重复全部 Windows 安装过程并允许用户选择要添加的内容。 注意:使用 bootcfg /rebuild 之前,应先通过 bootcfg /copy 命令备份 boot.ini
文件
。 bootcfg /scan 扫描用于 Windows 安装的所有磁盘并显示结果。 注意:这些结果被静态存储,并用于本次会话。如果在本次会话期间磁盘配置发生变化,为获得更新的扫描,必须先重新启动计算机,然后再次扫描磁盘。 bootcfg /list 列出引导列表
中
已有的条目。 bootcfg /disableredirect 在启动引导程序
中
禁用重定向。 bootcfg /redirect [ PortBaudRrate] |[ useBiosSettings] 在启动引导程序
中
通过指定配置启用重定向。 范例: bootcfg /redirect com1 115200 bootcfg /redirect useBiosSettings hkdsk 创建并显示磁盘的状态报告。Chkdsk 命令还可列出并纠正磁盘上的错误。 含有下列参数的 chkdsk 命令仅在使用故障恢复控制台时才可用。可在命令提示符下使用带有不同参数的 chkdsk 命令。 vol [drive:] [ chkdsk [drive:] [/p] [/r] 参数 无 如果不带任何参数,chkdsk 将显示当前驱动器
中
的磁盘状态。 drive: 指定要 chkdsk 检查的驱动器。 /p 即使驱动器不在 chkdsk 的检查范围内,也执行彻底检查。该参数不对驱动器做任何更改。 /r 找到坏扇区并恢复可读取的信息。隐含着 /p 参数。 注意 Chkdsk 命令需要 Autochk.exe
文件
。如果不能在启动目录(默认为 %systemroot%System32)
中
找到该
文件
,将试着在 Windows 安装 CD
中
找到它。如果有多引导系统的计算机,必须保证是在包含 Windows 的驱动器上使用该命令。 Diskpart 创建和删除硬盘驱动器上的分区。diskpart 命令仅在使用故障恢复控制台时才可用。 diskpart [ /add |/delete] [device_name |drive_name |partition_name] [size] 参数 无 如果不带任何参数,diskpart 命令将启动 diskpart 的 Windows 字符模式版本。 /add 创建新的分区。 /delete 删除现有分区。 device_name 要创建或删除分区的设备。设备名称可从 map 命令的输出获得。例如,设备名称: DeviceHardDisk0 drive_name 以驱动器号表示的待删除分区。仅与 /delete 同时使用。以下是驱动器名称的范例: D: partition_name 以分区名称表示的待删除分区。可代替 drive_name 使用。仅与 /delete 同时使用。以下是分区名称的范例: DeviceHardDisk0Partition1 大小 要创建的分区大小,以兆字节 (MB)表示。仅与 /add 同时使用。 范例 下例将删除分区: diskpart /delete Device HardDisk0 Partition3 diskpart /delete F: 下例将在硬盘上添加一个 20 MB 的分区: diskpart /add Device HardDisk0 20 Fixboot
复杂邮件程序完整Java源码,支持添加附件,图片,HTML格式文本,支持远程WebService调用
/* 复杂邮件程序完整Java源码,支持添加附件,图片,HTML格式文本,支持远程WebService调用*/ package com.hx.mail; import java.io.File; import java.util.Map; import javax.mail.Message.RecipientType; /** * MailServices 邮件接收发送接口定义类 * * @author 380595305@qq.com * Date 2010-05-11 * @version 1.0 */ public interface HexiangMailService { /** * sendMail 发送邮件函数 * * @param sender 是String类型,邮件发送者信息 * @param password 是String类型,邮件发送者密码 * @param addressee 是String类型,邮件接收者信息 * @param subject 是String类型,传入邮件主题 * @param text 是String类型,传入邮件消息 */ void sendMail(String sender,String password,String addressee,String subject,String text) throws Exception; /** * sendMail 发送邮件函数 * * @param sender 是String类型,邮件发送者信息 * @param password 是String类型,邮件发送者密码 * @param addressee 是String类型,邮件接收者信息 * @param subject 是String类型,传入邮件主题 * @param text 是String类型,传入邮件消息 * @param enclosures Map
邮件附件 * @param copyToSends Map
邮件抄送信息 */ void sendMail(String sender,String password,String addressee,String subject,String text,Map
enclosures,Map
copyToSends) throws Exception; /** * sendMail 发送邮件函数 * * @param sender 是String类型,邮件发送者信息 * @param password 是String类型,邮件发送者密码 * @param subject 是String类型,传入邮件主题 * @param imgs 是File[]类型,邮件正文
中
附件的图片信息 * @param htmlContent 是String类型,传入邮件消息正文 * @param enclosures Map
邮件附件 * @param copyToSends Map
邮件抄送信息 */ void sendMail(String sender,String password,String subject,File[] imgs,String htmlContent,Map
enclosures,Map
copyToSends) throws Exception; } package com.hx.mail; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Properties; import java.util.Set; import javax.activation.DataHandler; import javax.activation.DataSource; import javax.activation.FileDataSource; import javax.mail.Address; import javax.mail.Authenticator; import javax.mail.Message; import javax.mail.MessagingException; import javax.mail.PasswordAuthentication; import javax.mail.Session; import javax.mail.Transport; import javax.mail.Message.RecipientType; import javax.mail.internet.AddressException; import javax.mail.internet.InternetAddress; import javax.mail.internet.MimeBodyPart; import javax.mail.internet.MimeMessage; import javax.mail.internet.MimeMultipart; import javax.mail.internet.MimeUtility; import org.codehaus.xfire.attachments.ByteDataSource; /** * HexiangMailServiceImpl 邮件接收发送接口实现类 * * @author 380595305@qq.com * Date 2010-05-11 * @version 1.0 */ public class HexiangMailServiceImpl implements HexiangMailService { /** MailboxType 邮箱类型 */ private static Map
MailboxTypes = null; /** host 邮箱服务器类型 */ private String host = null; /** sender 邮件发送者 */ private String sender = null; /** addressee 邮件接收者 */ private String addressee = null; /** subject 邮件主题 */ private String subject = null; /** text 邮件消息 */ private String text = null; public static void init() { MailboxTypes = new HashMap
(); MailboxTypes.put("163", "smtp.163.com"); MailboxTypes.put("139", "smtp.139.com"); MailboxTypes.put("126", "smtp.126.com"); MailboxTypes.put("qq", "smtp.qq.com"); MailboxTypes.put("live", "smtp.live.cn"); MailboxTypes.put("msn", "smtp.msn.com"); MailboxTypes.put("kum", "mail.kum.net.cn"); MailboxTypes.put("hotmail", "smtp.hotmail.cn"); } /** * initialization 实例化类成员变量 */ private void initialization(String sender, String addressee, String subject, String text) { this.sender = sender; this.addressee = addressee; this.subject = subject; this.text = text; this.host = getHost(sender); // System.out.println("sender->"+this.sender+" | // addressee->"+this.addressee+" | subject->"+this.subject+" | // text->"+this.text+" | host->"+this.host); } /** * getHost
获取
目标邮箱服务器类型 * * @param sender * 是String类型,传入邮件发送者邮箱
地址
信息 * @return String 返回目标邮箱服务器类型 */ private String getHost(String sender) { String _host, _host_ = null; _host = sender.substring(sender.indexOf("@") + 1, sender.indexOf(".")); if (MailboxTypes == null) { init(); } _host_ = MailboxTypes.get(_host); // System.out.println(_host+" <--> "+_host_); if (_host_ == null) { // MailboxTypes.put(_host,"smtp."+_host+".com"); MailboxTypes.put(_host, "smtp." + sender.substring(sender.indexOf("@") + 1, sender .length())); } return MailboxTypes.get(_host); } public void sendMail(String sender, String password, String addressee, String subject, String text) throws Exception { initialization(sender, addressee, subject, text); Properties props = System.getProperties(); { props.put("mail.smtp.host", this.host); props.put("mail.smtp.auth", "true"); } ValidateAuther auther = new ValidateAuther(this.sender, password); Session session = Session.getDefaultInstance(props, auther); MimeMessage msg = new MimeMessage(session); InternetAddress fromAddr = new InternetAddress(this.sender); // 发送者邮箱
地址
InternetAddress toAddr = new InternetAddress(this.addressee); // 接收者邮箱
地址
msg.setFrom(fromAddr); msg.addRecipient(Message.RecipientType.TO, toAddr); /** * Message.RecipientType.TO -- 接收者 Message.RecipientType.CC -- 抄送 * Message.RecipientType.BCC --秘密抄送者 */ msg.setSubject(this.subject); // 邮件主题 msg.setText(this.text); // 邮件信息 Transport.send(msg); // 发送邮件 } public void sendMail(String sender, String password, String addressee, String subject, String text, Map
enclosures, Map
copyToSends) throws Exception { initialization(sender, addressee, subject, text); Properties props = System.getProperties(); { props.put("mail.smtp.host", this.host); props.put("mail.smtp.auth", "true"); } ValidateAuther auther = new ValidateAuther(this.sender, password); Session session = Session.getDefaultInstance(props, auther); Message msg = new MimeMessage(session); InternetAddress fromAddr = new InternetAddress(this.sender); // 发送者邮箱
地址
InternetAddress toAddr = new InternetAddress(this.addressee); // 接收者邮箱
地址
? msg.setFrom(fromAddr); msg.addRecipient(Message.RecipientType.TO, toAddr); msg.setSubject(this.subject); // 邮件主题 msg.setText(this.text); // 邮件信息 msg = setCopyToSends(msg, copyToSends); // 设置抄送信息 try { MimeMultipart msgMultipart = new MimeMultipart("mixed"); // 创建邮件复杂体 msgMultipart = setEnclosureFile(msgMultipart, enclosures); // 设置附件信息 msg.setContent(msgMultipart); // 将邮件复杂体添加到邮件正文
中
MimeBodyPart content = new MimeBodyPart(); // 创建邮件复杂体正文信息 msgMultipart.addBodyPart(content); // 将正文信息添加到复杂体
中
MimeMultipart bodyMultipart = new MimeMultipart("related"); content.setContent(bodyMultipart); MimeBodyPart htmlPart = new MimeBodyPart(); // 创建HTML文本域 bodyMultipart.addBodyPart(htmlPart); // 将HTML文本域添加到正文组合
中
DataSource htmlDs = new ByteDataSource(this.text==null?"".getBytes():this.text.getBytes()); // 指定文本域,创建DataSource DataHandler htmlDh = new DataHandler(htmlDs); htmlPart.setDataHandler(htmlDh); htmlPart.setContent(this.text, "text/html;charset=gbk"); msg.saveChanges(); // 生成邮件 String filePath = "d:\\demo1.
eml
"; OutputStream os = new FileOutputStream(filePath); msg.writeTo(os); os.close(); } catch (MessagingException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } // Transport.send(msg); // 发送邮件 } public void sendMail(String sender, String password, String subject, File[] imgs, String htmlContent, Map
enclosures, Map
copyToSends) throws Exception { initialization(sender, addressee, subject, htmlContent); Properties props = System.getProperties(); { props.put("mail.smtp.host", this.host); props.put("mail.smtp.auth", "true"); } ValidateAuther auther = new ValidateAuther(this.sender, password); Session session = Session.getDefaultInstance(props, auther); Message msg = new MimeMessage(session); InternetAddress fromAddr = new InternetAddress(this.sender); // 发送者邮箱
地址
// InternetAddress toAddr = new InternetAddress(this.addressee); // // 接收者邮箱
地址
? msg.setFrom(fromAddr); // msg.addRecipient(Message.RecipientType.TO, toAddr); msg.setSubject(this.subject); // 邮件主题 // msg.setText(this.text); // 邮件信息 msg = setCopyToSends(msg, copyToSends); // 设置抄送信息 try { MimeMultipart msgMultipart = new MimeMultipart("mixed"); // 创建邮件复杂体 msgMultipart = setEnclosureFile(msgMultipart, enclosures); // 设置附件信息 msg.setContent(msgMultipart); // 将邮件复杂体添加到邮件正文
中
if (htmlContent != null || (imgs != null && imgs.length > 0)) { MimeBodyPart content = new MimeBodyPart(); // 创建邮件复杂体正文信息 msgMultipart.addBodyPart(content); // 将正文信息添加到复杂体
中
// 搭建正文组合架构 -- 创建正文复杂体<含有html文本和图片
文件
> //related --> 关联关系 MimeMultipart bodyMultipart = new MimeMultipart("related"); content.setContent(bodyMultipart); StringBuffer htmlBuffer = new StringBuffer(); // 添加HTML文本域信息 // if (htmlContent != null) { // htmlContent = htmlBuffer.toString(); MimeBodyPart htmlPart = new MimeBodyPart(); // 创建HTML文本域 bodyMultipart.addBodyPart(htmlPart); // 将HTML文本域添加到正文组合
中
// DataSource htmlDs = new FileDataSource(htmlContent);// // 指定
文件
域,创建DataSource DataSource htmlDs = new ByteDataSource(htmlContent.getBytes()); // 指定文本域,创建DataSource DataHandler htmlDh = new DataHandler(htmlDs); // DataHandler //
文件
包装数据类 htmlPart.setDataHandler(htmlDh); // htmlPart.setContent(htmlContent,"text/html;charset=gbk"); // } // 添加图片域信息 if (imgs != null && imgs.length > 0) { htmlBuffer.append(htmlContent); // HTML格式文本域 for (int i = 0; i < imgs.length; i++) { MimeBodyPart gifPart = new MimeBodyPart(); bodyMultipart.addBodyPart(gifPart); // 将图片域添加到正文组合
中
DataSource gifDs = new FileDataSource(imgs[i]); DataHandler gifDh = new DataHandler(gifDs); gifPart.setDataHandler(gifDh); gifPart.setFileName(MimeUtility .encodeText(getFileName(imgs[i].getName()))); htmlBuffer.append("
"); // 将图片域加入到文本域
中
gifPart.setHeader("Content-Location", MimeUtility .encodeText(imgs[i].getName())); // 指定该图片(
文件
)路径从本地关联
文件
中
找 } } htmlContent = htmlBuffer.toString(); // 设置正文文本域及文本类型 htmlPart.setContent(htmlContent, "text/html;charset=gbk"); } msg.saveChanges(); // 生成邮件 String filePath = "d:\\demo2.
eml
"; OutputStream os = new FileOutputStream(filePath); msg.writeTo(os); os.close(); } catch (MessagingException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } Transport.send(msg); // 发送邮件 } //
获取
邮件
地址
信息 public static Address[] getAddress(List
recpType) throws AddressException, UnsupportedEncodingException { if (recpType == null || recpType.isEmpty()) { return null; } Address[] addrs = new Address[recpType.size()]; for (int i = 0; i < addrs.length; i++) { String nickNameAccount = getNickName(recpType.get(i)); String[] nickName_account = nickNameAccount.split(","); // System.out.println(nickName_account); addrs[i] = new InternetAddress("\"" + MimeUtility.encodeText("" + nickName_account[0] + "") + "\" <" + nickName_account[1] + ">"); } return addrs; } //
获取
邮箱账号昵称信息 public static String getNickName(String mailAccount) { int index = mailAccount.lastIndexOf("<"); if (index == -1) { // 不含有昵称信息,未找到"<>" // hexiang221@163.com String nickName = mailAccount.substring(0, mailAccount .lastIndexOf("@")); return nickName + "," + mailAccount; } else if (index == 0) { // 不含有昵称信息 但找到了"<>" //
String nickName = mailAccount.substring(index + 1, mailAccount .lastIndexOf("@")); String account = mailAccount.substring(index + 1, mailAccount .lastIndexOf(">")); return nickName + "," + account; } else if (index > 0) { // 含有昵称信息,并且找到了"<>" String nickName = mailAccount.substring(0, index); String account = mailAccount.substring(index + 1, mailAccount .lastIndexOf(">")); return nickName + "," + account; } return mailAccount; } //
获取
附件显示名称 public static String getFileName(String filePath) { String fileName = null; // ????? if (filePath == null || filePath.length() == 0) { return null; } int index = filePath.lastIndexOf("/"); if (index == -1) { return filePath; } fileName = filePath.substring(filePath.lastIndexOf("/") + 1); int index2 = fileName.lastIndexOf("\\"); if (index2 == -1) { return fileName; } return fileName.substring(filePath.lastIndexOf("\\")); } // 设置邮件附件信息 public static MimeMultipart setEnclosureFile(MimeMultipart msgMultipart, Map
enclosures) throws MessagingException, UnsupportedEncodingException { if (enclosures == null || enclosures.isEmpty()) { return msgMultipart; } if (msgMultipart == null) { msgMultipart = new MimeMultipart("mixed"); // 创建邮件复杂体 } Set
enclosureSet = enclosures.keySet(); Iterator
enclosureIter = enclosureSet.iterator(); while (enclosureIter.hasNext()) { String attchFileName = enclosureIter.next(); MimeBodyPart attch = new MimeBodyPart(); msgMultipart.addBodyPart(attch); File temEnclosureFile = enclosures.get(attchFileName); DataSource ds = new FileDataSource(temEnclosureFile); DataHandler dh = new DataHandler(ds); attch.setDataHandler(dh); attch.setFileName(MimeUtility .encodeText(getFileName(attchFileName)));// 设置附件显示名称 } return msgMultipart; } public static Message setCopyToSends(Message msg, Map
copyToSends) throws AddressException, UnsupportedEncodingException, MessagingException { if (copyToSends == null) { return msg; } Set
copyToSendSet = copyToSends.keySet(); Iterator
copyToSendIter = copyToSendSet.iterator(); List
to = new ArrayList
(); // 定义接收者账号信息集 List
cc = new ArrayList
(); // 定义抄送者账号信息集 List
bcc = new ArrayList
();// 定义秘密抄送者账号信息集 while (copyToSendIter.hasNext()) { String address = copyToSendIter.next(); //
获取
抄送者邮箱账号信息 RecipientType tmpRecipientType = copyToSends.get(address); if (tmpRecipientType == RecipientType.TO) { to.add(address); } if (tmpRecipientType == RecipientType.CC) { cc.add(address); } if (tmpRecipientType == RecipientType.BCC) { bcc.add(address); } } //
获取
接收者信息集 Address[] to_addrs = getAddress(to); if (to_addrs != null) { msg.setRecipients(MimeMessage.RecipientType.TO, to_addrs); } //
获取
抄送者信息集 Address[] cc_addrs = getAddress(cc); if (cc_addrs != null) { msg.setRecipients(MimeMessage.RecipientType.CC, cc_addrs); } //
获取
秘密抄送者信息集 Address[] bcc_addrs = getAddress(bcc); if (bcc_addrs != null) { msg.setRecipients(MimeMessage.RecipientType.BCC, bcc_addrs); } return msg; } } /** * ValidateAuther 邮件验证类,验证邮件发送者信息 */ class ValidateAuther extends Authenticator { /** 邮件发送者 */ private String sender; /** 邮件接受者 */ private String password; /** * ValidateAuther 验证邮件发送者信息 * * @param userName * 是String类型,传入邮件发送者账户 * @param password * 是String类型,传入邮件发送者账户密码 */ public ValidateAuther(String sender, String password) { this.sender = sender; this.password = password; } /** * getPasswordAuthentication 验证邮件发送者账户信息的函数 * * @param userName * 邮件发送者账户信息 * @param password * 邮件发送者账户密码 * @return PasswordAuthentication 返回邮件发送者账户验证信息 */ @Override protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(sender, password); } } // 支持WebService远程调用
HexiangMailService
com.hx.mail.HexiangMailService
com.hx.mail.HexiangMailServiceImpl
literal
application
Python批量解析
EML
文件
,
获取
邮件头信息以及附件并写入excel
获取
EML
邮件头信息,包括发件人,收件人,抄送人,邮件主题,时间,附件等信息。 1. 由于数据量较大,不建议使用xlrd,xlwt,改为使用openpyxl 2. 使用格式:python xxx.py(数据源) (输出源) 3. 针对邮件正文正则截取base64字段,编码后输出暂时无法解决图片及部分格式问题 4. 建议搭配官方
email
库食用更佳~ 我太菜了~ #!/usr/bin/env python3 # -*- coding: utf-8 -*- from typin...
下载资源悬赏专区
12,781
社区成员
12,309,767
社区内容
发帖
与我相关
我的任务
下载资源悬赏专区
CSDN 下载资源悬赏专区
复制链接
扫一扫
分享
社区描述
CSDN 下载资源悬赏专区
其他
技术论坛(原bbs)
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章