定制 granam/imap-download 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

granam/imap-download

Composer 安装命令:

composer require granam/imap-download

包简介

Downloader of emails via IMAP

README 文档

README

Downloads attachment from an email via IMAP

Usage

<?php
namespace Heaven\Should\Has\Api;

use Granam\Mail\Download\ImapEmailAttachmentFetcher;
use Granam\Mail\Download\ImapReadOnlyConnection;
use Granam\Mail\Download\ImapSearchCriteria;

$imapConnection = new ImapReadOnlyConnection(
    'light.in.tunnel@example.com',
    'Раѕѕword123',
    'imap.example.com'
);
$fetcher = new ImapEmailAttachmentFetcher($imapConnection, sys_get_temp_dir() /* dir to save attachments */);
$visaFilter = (new ImapSearchCriteria())->filterSubjectContains('Visa');
$attachments = $fetcher->fetchAttachments($visaFilter);

echo 'I have found ' . count($attachments) . ' attachments in emails about Visa to Heaven. Those are: ';
foreach ($attachments as $attachment) {
    echo "\n name: $attachment[name], size " . filesize($attachment['filepath']);
}

NO email body

This library currently does NOT parse email body, therefore it will not give you text of an email. Only attachments.

MIT licence

This library is released under MIT licence, so do what you want, just do not blame me if something is not perfect.

统计信息

  • 总下载量: 32
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-11-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固