将包含网页表格的电子邮件发送到电子邮件正文中

时间:2013-12-20 21:39:40

标签: javascript html email

我想知道我是否可以将网页上的表格传递给电子邮件正文。我想知道这是否可能,如果是这样,我指向正确的方向

我的按钮:

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

href="mailto:myemail@whatever.com">

表:

<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>

目标:将表从webform导入到电子邮件正文

1 个答案:

答案 0 :(得分: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>

所以你要重新创建表格。

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

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