使用jquery中的自定义预定义电子邮件文本打开电子邮

时间:2014-06-13 14:47:26

标签: php jquery

我正在尝试使用jquery发送电子邮件。这是我的代码

$text = "mailto:info@diadori.com?subject=The Vow Engagement Ring Finder&body=" . "Hi, I found an engagement ring that I love and want to know what you think. To see the ring download the iPhone app named <The Vow Engagement Ring Finder> iPhone - http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=509902433&mt=8 - Android - https://play.google.com/store/apps/details?id=com.diadori.thevow. View the ring: ". $rings[0]['ringThumbNailImagePath'] . "</html>";

    $bodytag = str_replace(" ", "%20", $text );
在jquery中

window.location.herf = $bodytag;

它工作正常,但是文本仅显示为id = 509902433,因为&amp;它停在那里。我试过放置html标签但没有工作。

如何在mailto中自定义消息。 第二是有没有办法添加附件?

1 个答案:

答案 0 :(得分:0)

百分比编码:

... ects/MZStore.woa/wa/viewSoftware?id=509902433%26mt=8 - Androi ...

... ects/MZStore.woa/wa/viewSoftware?id=509902433&mt=8 - Androi ...

所以:

请参阅此相关主题:escaping ampersand in url