dtml-sendmail

S

shashaank

hello all.
i am new to both dtml and zope. i have inherited a piece of dtml code
that essentially perfoms sending email.

--snip--
<dtml-comment>Send email</dtml-comment>
<dtml-try>

<dtml-sendmail smtphost="MailHost" mailto="<dtml-var email>"
mailfrom="(e-mail address removed)">
Subject: Confirming your account.

</dtml-sendmail>
<dtml-except>
Sorry, we could not process your email.
<p><dtml-var error_type>: <dtml-var error_value><pre><tt>
<dtml-var error_tb></pre;></tt></p>
</dtml-try>

--snip--
the syntax looks fine and i have configured "MailHost" to our internal
mail server 192.168.1.8 but the emails do not seem to go through nor
do i get the exception message. can any one tell me if am missing
something fundamental over here. thanks a lot.
 
T

Thomas =?ISO-8859-1?Q?Kr=FCger?=

shashaank said:
--snip--
<dtml-comment>Send email</dtml-comment>
<dtml-try>

<dtml-sendmail smtphost="MailHost" mailto="<dtml-var email>"
mailfrom="(e-mail address removed)">
Subject: Confirming your account.

</dtml-sendmail>
<dtml-except>
Sorry, we could not process your email.
<p><dtml-var error_type>: <dtml-var error_value><pre><tt>
<dtml-var error_tb></pre;></tt></p>
</dtml-try>

--snip--

1. Don't indent the lines of the mail. All header lines must not start with
any whitespace character.
2. Using dtml syntax inside a dtml-tag will not work.
3. You need to define the mailhost.

example:
<dtml-sendmail mailhost="MailHost">
Subject: Some subject
To: <dtml-var mail>
From: (e-mail address removed)

Some text!
</dtml-sendmail>

Thomas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top