[Zope] Re: sendmail tag

Sungmook Kim dotorimook@yahoo.com
Thu, 16 Jan 2003 19:06:34 +0100 (CET)


--0-949404902-1042740394=:39827
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit


thanks.
i was successful inserting it into a dtml document for a sendmail tag.
but how do i use <dtml-var "HTTP_X_FORWARDED_FOR"> in a
, e.g. page template for a guestbook? so it returns the ip, too.
i have this page template code for my guestbook, and zope did not allow
to put that ip variable. 
cheers,sungmook
---source code of a page template ---
<div tal:define="entries here/getEntries">
<div tal:condition="entries">
 
<center>
<table border="0" width="800" cellspacing="3" cellpadding="3" tal:repeat="entry entries"
       bgcolor="#CCCCFF">
  <tr align="center">
    <td bgcolor="#336699" width="50%">
      <b><span tal:replace="entry/name">Name</span></b>
      from <span tal:replace="entry/wo">Aus</span> 
    </td>
    <td bgcolor="#336699">
      <b><span tal:replace="entry/file_date">Datum</span></b>
    </td>
  </tr>
  <tr align="center">
    <td bgcolor="#336699" width="50%">
      <img src="/images/url.gif" alt="Homepage" align="middle" />&nbsp;
      <a class="plain" target="_blank" tal:attributes="href entry/hp"><span
    tal:replace="entry/hp"></span></a>
    </td>
    <td bgcolor="#336699" width="50%">
      <img src="/images/mail.gif" alt="e-Mail" align="middle" />&nbsp;
      <kbd><span tal:replace="entry/email">e-Mail</span></kbd>
    </td>
  </tr>
  <tr>
    <td bgcolor="#5599CC" width="50%" colspan="2">
      <kbd tal:content="structure python:here.formatEntry(entry)">Entry contents</kbd>
    </td>
  </tr>
  <tr>
    <td colspan="2" height="5" bgcolor="#CCCCFF"></td>
  </tr>
</table></center>
</div>

 
 Jason Bush <jason@nol.org> wrote:Jason Bush wrote:

> Sungmook Kim wrote:
>
>> thanks.
>>
>> does anyone know and tell me how to write a code to receive the ip 
>> adress of the sender within this sendmail tag (without using an extra 
>> zope product) or in general, e.g. in guestbooks?
>>
>> cheers,
>>
>> sungmook
>>
>> 
>>
> If you want the IP of the client running a mail script
> 

> will give you that.
>
> Hope that helps.
>
Note that if a proxy is involved the IP is in HTTP_X_FORWARDED_FOR.

-- 
"The wise man desires to be slow to speak but quick to act." --Confucious
Jason Bush | (402) 471-6517 | jason@nol.org | http://www.nol.org





_______________________________________________
Zope maillist - Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists - 
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )


---------------------------------
Gesendet von http://mail.yahoo.de.
Bis zu 100 MB Speicher bei http://premiummail.yahoo.de.
--0-949404902-1042740394=:39827
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

<P>thanks.
<P>i was successful inserting it into a dtml document for a sendmail tag.
<P>but how do i use &lt;dtml-var "HTTP_X_FORWARDED_FOR"&gt; in a
<P>, e.g. page template for a guestbook? so it returns the ip, too.
<P>i have this page template code for my guestbook, and zope did not allow
<P>to put that ip variable. 
<P>cheers,sungmook
<P>---source code of a page template ---
<P>&lt;div tal:define="entries here/getEntries"&gt;<BR>&lt;div tal:condition="entries"&gt;
<P>&nbsp;
<P>&lt;center&gt;<BR>&lt;table border="0" width="800" cellspacing="3" cellpadding="3" tal:repeat="entry entries"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bgcolor="#CCCCFF"&gt;<BR>&nbsp; &lt;tr align="center"&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;td bgcolor="#336699" width="50%"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;b&gt;&lt;span tal:replace="entry/name"&gt;Name&lt;/span&gt;&lt;/b&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from &lt;span tal:replace="entry/wo"&gt;Aus&lt;/span&gt; <BR>&nbsp;&nbsp;&nbsp; &lt;/td&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;td bgcolor="#336699"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;b&gt;&lt;span tal:replace="entry/file_date"&gt;Datum&lt;/span&gt;&lt;/b&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;/td&gt;<BR>&nbsp; &lt;/tr&gt;<BR>&nbsp; &lt;tr align="center"&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;td bgcolor="#336699" width="50%"&gt;
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;img src="/images/url.gif" alt="Homepage" align="middle" /&gt;&amp;nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;a class="plain" target="_blank" tal:attributes="href entry/hp"&gt;&lt;span<BR>&nbsp;&nbsp;&nbsp; tal:replace="entry/hp"&gt;&lt;/span&gt;&lt;/a&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;/td&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;td bgcolor="#336699" width="50%"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;img src="/images/mail.gif" alt="e-Mail" align="middle" /&gt;&amp;nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;kbd&gt;&lt;span tal:replace="entry/email"&gt;e-Mail&lt;/span&gt;&lt;/kbd&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;/td&gt;<BR>&nbsp; &lt;/tr&gt;<BR>&nbsp; &lt;tr&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;td bgcolor="#5599CC" width="50%" colspan="2"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;kbd tal:content="structure python:here.formatEntry(entry)"&gt;Entry contents&lt;/kbd&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;/td&gt;<BR>&nbsp; &lt;/tr&gt;<BR>&nbsp; &lt;tr&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;td colspan="2" height="5" bgcolor="#CCCCFF"&gt;&lt;/td&gt;<BR>&nbsp; &lt;/tr&gt;<BR>&lt;/table&gt;&lt;/center&gt;<BR>&lt;/div&gt;<BR>
<P>&nbsp;
<P>&nbsp;<B><I>Jason Bush &lt;jason@nol.org&gt;</I></B> wrote:
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Jason Bush wrote:<BR><BR>&gt; Sungmook Kim wrote:<BR>&gt;<BR>&gt;&gt; thanks.<BR>&gt;&gt;<BR>&gt;&gt; does anyone know and tell me how to write a code to receive the ip <BR>&gt;&gt; adress of the sender within this sendmail tag (without using an extra <BR>&gt;&gt; zope product) or in general, e.g. in guestbooks?<BR>&gt;&gt;<BR>&gt;&gt; cheers,<BR>&gt;&gt;<BR>&gt;&gt; sungmook<BR>&gt;&gt;<BR>&gt;&gt; <BR>&gt;&gt;<BR>&gt; If you want the IP of the client running a mail script<BR>&gt; <DTML-VAR ?REQUEST.REMOTE_ADDR?><BR>&gt; will give you that.<BR>&gt;<BR>&gt; Hope that helps.<BR>&gt;<BR>Note that if a proxy is involved the IP is in HTTP_X_FORWARDED_FOR.<BR><BR>-- <BR>"The wise man desires to be slow to speak but quick to act." --Confucious<BR>Jason Bush | (402) 471-6517 | jason@nol.org | http://www.nol.org<BR><BR><BR><BR><BR><BR>_______________________________________________<BR>Zope maillist - Zope@zope.org<BR>http://lists.zope.org/mailman/listinfo/zope<BR>** No cross posts or HTML encoding! **<BR>(Related lists - <BR>http://lists.zope.org/mailman/listinfo/zope-announce<BR>http://lists.zope.org/mailman/listinfo/zope-dev )</BLOCKQUOTE><p><br><hr size=1>Gesendet von <a href=http://de.yahoo.com/mail_de/tagline/?http://mail.yahoo.de>http://mail.yahoo.de</a>.<br>
Bis zu 100 MB Speicher bei <a href=http://de.yahoo.com/mail_de/tagline/?http://premiummail.yahoo.de>http://premiummail.yahoo.de</a>.
--0-949404902-1042740394=:39827--