hi, i'm trying to use this sendmail tag but received an error message which i cannot understand. could someone help me out here? thanks ---error message--- Error Type: TypeError Error Value: len() of unsized object ---my code--- --the "code" SendFeedback-- <dtml-sendmail smtphost="localhost"> To: Feedback Recipient <dotorimookl@yahoo.com > From: Zope Feedback Form <zope_form@example.com> Subject: Feedback from the web Feedback from : <dtml-var name> message: <dtml-var comments> </dtml-sendmail> <h1>thanks</h1> <p>your message has beent sent</p> ---and the code feedback--- <H2>send us your feedback</H2> <form action="SendFeedback" method="post"> your Name: <input type="text" name="name" size="40"> <br> <textarea name="comments" rows="10" cols="50"> Here </textarea><br> <input type="submit" value="Send Feedback"> </form> --------------------------------- Gesendet von http://mail.yahoo.de. Bis zu 100 MB Speicher bei http://premiummail.yahoo.de.
From: "Sungmook Kim" <dotorimook@yahoo.com>
i'm trying to use this sendmail tag but received an error message which i cannot understand. could someone help me out here? thanks
I recognize that, but I don't remember what the problem is. Which Zope version are you using? Can you provide us with a traceback so I can see where the error occurs?
Sungmook Kim wrote:
hi,
i'm trying to use this sendmail tag but received an error message which i cannot understand. could someone help me out here? thanks
---error message--- Error Type: TypeError Error Value: len() of unsized object
---my code--- --the "code" SendFeedback--
<dtml-sendmail smtphost="localhost"> To: Feedback Recipient <dotorimookl@yahoo.com <mailto:dotorimookl@yahoo.com> > From: Zope Feedback Form <zope_form@example.com <mailto:zope_form@example.com>> Subject: Feedback from the web
Feedback from : <dtml-var name> message: <dtml-var comments> </dtml-sendmail>
Please remove all whitespace (indent) in your mail-header. Something like this should work: <dtml-sendmail smtphost="localhost"> To: Feedback Recipient ... From: Zope Feedback Form ... Subject: Feedback from ... Feedback from : <dtml-var name> message: <dtml-var comments> </dtml-sendmail> Cheers, Maik
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 Maik Jablonski <maik.jablonski@uni-bielefeld.de> wrote:Sungmook Kim wrote:
hi,
i'm trying to use this sendmail tag but received an error message which i cannot understand. could someone help me out here? thanks
---error message--- Error Type: TypeError Error Value: len() of unsized object
---my code--- --the "code" SendFeedback--
To: Feedback Recipient > > From: Zope Feedback Form > > Subject: Feedback from the web
Feedback from :
message:
Please remove all whitespace (indent) in your mail-header. Something like this should work: To: Feedback Recipient ... From: Zope Feedback Form ... Subject: Feedback from ... Feedback from : message: Cheers, Maik _______________________________________________ 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.
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 <dtml-var "REQUEST.REMOTE_ADDR"> will give you that. Hope that helps. -- "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
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 <dtml-var "REQUEST.REMOTE_ADDR"> 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
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" /> <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" /> <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.
Sungmook Kim wrote:
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
Bear with me as I am a bit rusty using ZPT but to display the IP you would use <span tal:replace="structure request/REMOTE_ADDR"> for non proxy requests</span> and <span tal:replace="structure request/HTTP_X_FORWARDED_FOR"> for proxy requests</span> -- "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
participants (4)
-
Jason Bush -
Lennart Regebro -
Maik Jablonski -
Sungmook Kim