On Yesterday, Jin Chen wrote:
Delivered-To: olpa@sybcom.de Subject: Sendmail problem Date: Tue, 11 Dec 2001 09:50:13 -0800 To: olpa@sybcom.de From: Jin Chen <jchen@nautilus.org>
Dear Oliver,
I am very excited to read your posting. I was bothered by the same problem for a long time and didn't solve it. I follow your idea and modified my code but I had the same error message as before. Would you please give me any suggestion?
i will try to do my best
How can I set up the 'SMTP Host' in MailHost object?
create a mailhost object, and put in "smtp host" the hostname of your smtp server. you can test the smtp server by doing a telnet on port 25 on it and he should answer "220 blabla"
Can I use a variable in the mailfrom, such as mailfrom=<dtml-var pemail>?
yes, directly with mailfrom=pemail
Feedback code is:
<dtml-var standard_html_header>
<H2>We want your Feedback!</H2>
<form action="SendFeedback" method="post"> Your Name: <input type="text" name="name" size="40"> <br> Email: <input type="text" name="pemail" size="40"> <br> <textarea name="comments" rows="10" cols="50"> Type your comments here. </textarea><br> <input type="submit" value="Send Feedback"> </form>
<dtml-var standard_html_footer> --------------------------------------------------------------- SendFeedback Code is:
<dtml-var standard_html_header> <dtml-sendmail mailhost=MailHost mailfrom=jen@nautilus.org mailto=jen@nautilus.org>
this is bad and should be (you just forgot some quotes) <dtml-sendmail mailhost=MailHost mailfrom="jen@nautilus.ort" mailto="jen@nautilus.org">
From: jen@nautilus.org To: jen@nautilus.org Subject: blabla
Feedback from : <dtml-var name> </dtml-sendmail>
<h1>Thank you for your input!</h1> <p>Your comments have been sent.</p>
<dtml-var standard_html_footer> ****************************************** Error is:
Zope Error Zope has encountered an error while publishing this resource.
Error Type: error Error Value: (10061, 'Connection refused')
the connection refused can be checked with the telnet trick... simply do telnet smtphost 25 and look if you can connect. If you cannot connect, then you must ask your sysadmin what is the name of the smtp server. --- "I suppose the secret to happiness is learning to appreciate the moment." -Calvin --- Oliver Pabst .-------------------------. mailto:olpa@sybcom.de : : phone :+49 681 56600600 : project department : SYBCOM GmbH fax :+49 681 56600660 : : http://www.sybcom.de