2014-03-25 27 views
0

你好,我想要得到的是当我点击电子邮件中的链接它捕获电子邮件的主题,并将其作为参数传递给另一个页面,我可以存储此主题行。 例如这里是我的电子邮件模板代码如何使用javascript将邮件主题作为参数传递?

<a href=" https://forms.netsuite.com/app/site/crm/externalleadpage.nl?compid=31156& formid=71&h=7a67f393397380048296" target="_blank">Download this publication featuring research from Gartner now</a> 

在HREF我想通过电子邮件主题作为参数传递给其他页这是一种形式。

+0

你是什么意思?您的代码与电子邮件无关 – Raptor

+0

它在电子邮件模板中 – user2787474

回答

1

我认为这真的取决于您如何生成电子邮件主题和正文,生成电子邮件时,如果您正在使用服务器端脚本,则可以将邮件主题变量放在邮件中的链接中。

例如,如果您使用php邮件功能发送邮件,以下是发送邮件的代码。

$to  = '[email protected]'; 
$subject = 'the subject'; 
//Notice that we just included the subject in $message as part of the link address. 
$message = '<a href="https://xxxx?subject=${subject}">xxxx</a>'; 
$headers = 'From: [email protected]' . "\r\n" . 
    'Reply-To: [email protected]' . "\r\n" . 
    'X-Mailer: PHP/' . phpversion(); 

mail($to, $subject, $message, $headers); 

如果您使用其他工具,则方法将类似。

相关问题