[英]open imap fetch body as outlook mail
我在我的php頁面中有一個按鈕
$body = imap_fetchbody($mbox, $num, 2);
我想用身體打開視野
$body="
From: test
Sent: Wednesday, March 7, 2018 10:25 PM
To: test2
Subject: Report Clarity/Option
name,
I need the following tweaks/fixes in the report
test1
test2
test3
Thanks and Regards
name
Adress
E-MAIL CONFIDENTIALITY NOTICE: The contents of this e-mail message and any attachments are intended solely for the addressee(s) and may contain confidential and/or legally privileged information. If you are not the intended recipient of this message or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message and any attachments. If you are not the intended recipient, you are notified that any use, dissemination, distribution, copying, or storage of this message or any attachment is strictly prohibited.";
和我的按鈕
<a href="mailto:name@off.com?subject=<?php echo $details['subject']?>&body=<?php echo $details['body'] ?>"><i class="fa fa-eye"></i></a>
按鈕壞了。請幫助我。如何解決此問題。任何幫助將不勝感激。
根據RFC 3986-統一資源標識符 ,您必須使用rawurlencode()
對字符串進行編碼,以便在URI中使用。
<a href="mailto:name@off.com?subject=<?php echo rawurlencode($details['subject'])?>&body=<?php echo rawurlencode($details['body']) ?>"><i class="fa fa-eye"></i></a>
這將輸出:
<a href="mailto:name@off.com?subject=...&body=%0A%0AFrom%3A%20test%0ASent%3A%20Wednesday%2C%20March%207%2C%202018%2010%3...."><i class="fa fa-eye"></i></a>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.