2016-08-02 14 views
0

で生のEメールヘッダを送信すると、現在、これは私がではSwiftMailerは、私が欲しいものではSwiftMailer

私は、ヘッダーでのフィールドを設定することができ $message->setFrom()を使用
// Create the message 
$message = Swift_Message::newInstance(); 
$message->setSubject("This email is sent using Swift Mailer"); 
$message->setBody("You {fullname}, are our best client ever thanks " . 
    " to the {transactions} transactions you made with us."); 
$message->setFrom("[email protected]", "Your bank"); 

で何ができるかであるではSwiftMailer

を使用して、生のヘッダを送信することですしかし私が欲しいのは、この

$rawHeader = 'MIME-Version: 1.0 
Content-Type: multipart/alternative; 
boundary="_=_swift_v4_1467746603_bb0677c43b2ba275b8602c907ef7228a_=_" 
List-Unsubscribe: <http://go.proctorgallagher.com/unsubscribe/u/45802/41c5731bb75f7959e5880279725cb9b7b4f8996214976c36a0f93e36e88e7705/876424750> 
X-Report-Abuse-To: [email protected] 
x-job: 7215816_12853 

--_=_swift_v4_1467746603_bb0677c43b2ba275b8602c907ef7228a_=_ 
Content-Type: text/plain; charset=utf-8 
Content-Transfer-Encoding: quoted-printable' 

$message->rawHeader($rawHeader); 

または私はではSwiftMailerがContent-Typeであることを知っている必要はありません何かのようなものですフィールドと値はtext/plain

私はそれが別々にすべてを置く必要はありませんので、私が置くことを置くことを意味します。

答えて

0

は、あなたが試してみました:

$message->setBody("You {fullname}, are our best client ever thanks " . 
    " to the {transactions} transactions you made with us.", "text/plain", "utf-8"); 
+0

をこのソリューションを使用すると、私は別にもう一度コンテンツを追加しなければならない - 私が欲しいのは一箇所にヘッダを入れているし、それに行うこと - それが可能だ場合 – Muhammad

関連する問題