emails etc

0 views
Skip to first unread message

michael nt milne

unread,
Oct 5, 2005, 8:43:39 AM10/5/05
to Plone-Event...@googlegroups.com
Hi

I'm new to this list. Just wondering how the product does the email
sending bit etc. Does it use a smtp program, mass mailer at all? I
didn't see any mention of it within the documentation etc.

Thanks

Michael

Sverre Helge Bolstad

unread,
Oct 5, 2005, 9:45:00 AM10/5/05
to Plone-Event...@googlegroups.com
Hi

The automatic confirmation mail uses MailHost, in the registrant.py
file:
# Send the message
portal.MailHost.send(message.as_string())

The "mail all registrants" function uses the dtml.sendmail tag
located in EventRegistration/skins/event_registration/
send_feedback.dtml:

<dtml-sendmail smtphost="localhost">
To: <dtml-var to_adress>
From: <dtml-var from_portal> - <dtml-var from_adress>
Subject: <dtml-var title_subject>

<dtml-var body>
</dtml-sendmail>
<dtml-call "RESPONSE.redirect('folder_contents?
portal_status_message=Email sent !')">

I guess it would be best if the "mail all registrants" used the
MailHost as well ?

r,
Sverre

michael nt milne

unread,
Oct 5, 2005, 11:22:51 AM10/5/05
to Plone-Event...@googlegroups.com
Hi

So is that just the locahost's default smtp program then?

Sverre Helge Bolstad

unread,
Oct 5, 2005, 3:50:38 PM10/5/05
to Plone-Event...@googlegroups.com
Den 5. okt. 2005 kl. 17.22 skrev michael nt milne:


Hi

So is that just the locahost's default smtp program then?


yes, it uses the Zope MailHost Object to send mail through the smtp server. I dont think it has to be localhost...

look at http://www.plope.com/Books/2_7Edition/ZopeServices.stx#1-5 for more information about MailHost.

r,
Sverre

Jason McVetta

unread,
Oct 5, 2005, 5:37:23 PM10/5/05
to Plone-Event...@googlegroups.com
On 10/5/05, michael nt milne <michae...@gmail.com> wrote:
So is that just the locahost's default smtp program then?

By default, MailHost uses the localhost for smtp.  But it can be configured to use an arbitrary smtp server -- it's very easy to do either in ZMI or programatically like this:
mh = portal.MailHost
mh.title = 'whatever you wanna call your mail host'
mh.smtp_host = 'mail.yourdomain.com'
mh.smtp_port = '25'  # you don't need this unless you're using a funky port; 25 is default
Reply all
Reply to author
Forward
0 new messages