[Zope] SMTP Success, sort of . . .
Jerry.Spicklemire@IFLYATA.COM
Jerry.Spicklemire@IFLYATA.COM
Mon, 4 Oct 1999 22:46:57 -0500
Hi Zope fans,
For those of you equally stymied by a mailhost object that refuses to work,
I finally got that picky little fellow functioning. There were two potential
problems, both of which existed in my example.
Remember the error message was:
Zope Error Zope has encountered an error while publishing this resource.
Error Type: SMTP Error
Error Value: Received error code 503 from SMTP: 503 Need RCPT (recipient)
First, there can be no spaces before the "To:" in the recipient line. This
most likely applies to other lines, such as From:, but I'm way too toasted
to spend any more time on it. Of course, since I copied and pasted my
template code directly from the Zope Documentation into my DTML method, I
"knew" that it had to be "correct". What I didn't know was that the spaces
that I copied were added for cosmetic effect in the context of an on-line
document. Live and learn.
Second, the mailhost line in the dtml "action" method must be followed
immediately by the recipient information. An extra line feed will also cause
smtp to fail. I honestly have no clue when or how that extra line feed crept
in , but I can tell you with certainty that I was trying everything I could
think of to get this sucker working, including lot's of stuff that made no
sense whatever, and in an infinite range of combinations. Sadly, my
instincts were correct. It was something totally dumb that was so "obvious"
that it never occurred to the cognoscenti to mention it.
These are the kinds of things that make anyone who knows smtp to say,
"duh!", and anyone who is trying to duplicate text examples of a "working"
system from "documentation" to wonder, "Why couldn't they just say that!".
Having claimed success, it is in fact conditional. I have received mail sent
from inside our firewall, out to an InterNet smtp host, which in turn was
forwarded (back) to my internal E-Mail. However, mail from inside to inside
seems to vanish. So, in fact it still doesn't really work, for our purposes.
It would have been nice if I had stumbled upon this about 1000 iterations
ago, and a month or two back, but the damage to Zope's reputation around
here has already been done. It will be a lot harder to revive it from here
on.
Keep on keepin' on,
Jerry Spicklemire