2013-12-20 23 views
0

我想知道是否可以将网页上的表格传递给电子邮件正文。我在想,如果这是可能的,如果有那么点我在正确的方向将包含网页表格的电子邮件发送到电子邮件正文

我的按钮:

<input type="submit" value="SUBMIT EMAIL TO: GNOC" <a 

href="mailto:[email protected]"> 

表:

<table cellpadding="4" cellspacing="0" 

border="0" width="100%"> 
      <tr> 
       <td 

id="_invisibleIfEmpty" name="_invisibleIfEmpty" 

colspan="3" valign="top" width="100%"> 

<WebPartPages:WebPartZone runat="server" 

Title="loc:Header" ID="Header" 

FrameType="TitleBarOnly"/> </td> 
      </tr> 
      <tr> 
       <td 

id="_invisibleIfEmpty" name="_invisibleIfEmpty" 

rowspan="4" valign="top" height="100%"> 

<WebPartPages:WebPartZone runat="server" 

Title="loc:LeftColumn" ID="LeftColumn" 

FrameType="TitleBarOnly"/> </td> 
       <td 

id="_invisibleIfEmpty" name="_invisibleIfEmpty" 

valign="top" height="100%"> <WebPartPages:WebPartZone 

runat="server" Title="loc:Row1" ID="Row1" 

FrameType="TitleBarOnly" Orientation="Horizontal"/> 

</td> 
       <td 

id="_invisibleIfEmpty" name="_invisibleIfEmpty" 

rowspan="4" valign="top" height="100%"> 

<WebPartPages:WebPartZone runat="server" 

Title="loc:RightColumn" ID="RightColumn" 

FrameType="TitleBarOnly"/> </td> 
      </tr> 
      <tr> 
       <td 

id="_invisibleIfEmpty" name="_invisibleIfEmpty" 

valign="top" height="100%"> <WebPartPages:WebPartZone 

runat="server" Title="loc:Row2" ID="Row2" 

FrameType="TitleBarOnly" Orientation="Horizontal"/> 

</td> 
      </tr> 
      <tr> 
       <td 

id="_invisibleIfEmpty" name="_invisibleIfEmpty" 

valign="top" height="100%"> <WebPartPages:WebPartZone 

runat="server" Title="loc:Row3" ID="Row3" 

FrameType="TitleBarOnly" Orientation="Horizontal"/> 

</td> 
      </tr> 
      <tr> 
       <td 

id="_invisibleIfEmpty" name="_invisibleIfEmpty" 

valign="top" height="100%"> <WebPartPages:WebPartZone 

runat="server" Title="loc:Row4" ID="Row4" 

FrameType="TitleBarOnly" Orientation="Horizontal"/> 

</td> 
      </tr> 
      <tr> 
       <td 

    id="_invisibleIfEmpty" name="_invisibleIfEmpty" 

colspan="3" valign="top" width="100%"> 

<WebPartPages:WebPartZone runat="server" 

Title="loc:Footer" ID="Footer" 

FrameType="TitleBarOnly"/> </td> 
      </tr> 
      <script 

language="javascript">if(typeof 

(MSOLayout_MakeInvisibleIfEmpty) == "function") 

{MSOLayout_MakeInvisibleIfEmpty();}</script> 
    </table> 

目标:导入表从网络表格到电子邮件正文

+1

不要以为你可以。它将是一个字符串而不是HTML。 – putvande

+0

[MailTo与HTML正文]可能的重复(http://stackoverflow.com/questions/5620324/mailto-with-html-body) – putvande

+0

但我的Outlook属性可以切换到HTML模式,所以我不明白为什么它不能采取这些表? – SlopTonio

回答

0

这是不可能的。

但是,为什么不使用ajax调用来发送表中的所有信息,就好像它是表单一样?在单独的PHP文件你打电话,使用PHP的邮件功能(http://php.net/manual/en/function.mail.php

例如:

<form type="POST"> 
<table> <!-- This is your table --> 
<tr> 
<td> 
Username 
</td> 
<td> 
<input type="text" name="username" value="whateveruserentered" /> 
</td> 
</tr> 
<table> 

所以在AJAX方法,你会通过发送用户名。然后在你打电话给你的php页面上,你会说

<table> 
<tr> 
<td> 
Username 
</td> 
<td> 
<?php echo $_POST['username']; ?> 
</td> 
</tr> 
<table> 

所以你正在重新创建表。

将所有这些放在邮件属性的主体中,然后关闭它。就像在原始页面上一样,完全成熟的桌子。

为了发送你想要的模板化信息?

相关问题