2014-05-20 88 views
1

我想加載多個電子郵件保存爲TXT文件併發送給他們與swiftmailer。 TXT文件都是這樣加載和發送電子郵件保存爲文本文件

Received: (qmail 17484 invoked from network); 1 May 2014 03:38:08 -0000 
Received: from localhost (localhost [127.0.0.1]) 
    by myserver.example.com.dyndns.org ([192.168.1.2]); 01 May 2014 03:38:08 -0000 
Received: from otherserver.example.net ([127.0.0.1]) 
    by localhost ([127.0.0.1]) 
    with SMTP via TCP; 01 May 2014 03:38:08 -0000 
Received: (qmail 4822 invoked from network); 1 May 2014 03:38:07 -0000 
Received: from blablabla.example.org ([103.123.123.11]) 
    by otherserver.example.net ([123.123.6.152]) 
    with ESMTP via TCP; 01 May 2014 03:38:07 -0000 
To: <[email protected]> 
Date: Thu, 01 May 2014 12:37:29 +0900 
From: <[email protected]> 
Subject: Awesome subject of email 
MIME-Version: 1.0 
Content-Type: text/plain; charset=ISO-2022-JP 


Fantastic email text 

我找不到Swift_Message類from_string方法。解析txt文件並創建一個帶有解析信息的新Swift_Message對象是唯一的解決方案嗎?

+0

這不是一個確切的副本,因爲您特意詢問有關SwiftMailer,但看看這個問題:http://stackoverflow.com/q/5044194/1237411 –

+0

不是一個swiftmail的解決方案,但可以解決您的問題: 「給出一封電子郵件作爲原始文本,我怎樣才能使用PHP發送它?」 http://stackoverflow.com/questions/6632399/given-an-email-as-raw-text-how-can-i-send-it-using-php – bloodyKnuckles

回答

相關問題