Sending email from a controller method?

0 views
Skip to first unread message

iain duncan

unread,
Nov 25, 2006, 8:38:03 PM11/25/06
to turbo...@googlegroups.com
What's the best way to go about doing that? Not something I've done in
python so I'm unaware of the library issues and any snags I might come
across.

Thanks
Iain

Lee McFadden

unread,
Nov 25, 2006, 9:06:38 PM11/25/06
to turbo...@googlegroups.com

TurboMail[1][2] has worked very well for me.

[1]: http://cheeseshop.python.org/pypi/TurboMail
[2]: http://www.topfloor.ca/turbomail/documentation/reference/

--
Lee McFadden

blog: http://www.splee.co.uk
work: http://fireflisystems.com
skype: fireflisystems

iain duncan

unread,
Nov 25, 2006, 9:44:39 PM11/25/06
to turbo...@googlegroups.com
On Sun, 2006-26-11 at 02:06 +0000, Lee McFadden wrote:
> On 11/26/06, iain duncan <iaind...@telus.net> wrote:
> >
> > What's the best way to go about doing that? Not something I've done in
> > python so I'm unaware of the library issues and any snags I might come
> > across.
>
> TurboMail[1][2] has worked very well for me.
>
> [1]: http://cheeseshop.python.org/pypi/TurboMail
> [2]: http://www.topfloor.ca/turbomail/documentation/reference/
>

Thanks again Lee!

Iain

iain duncan

unread,
Nov 25, 2006, 10:16:18 PM11/25/06
to turbo...@googlegroups.com
On Sun, 2006-26-11 at 02:06 +0000, Lee McFadden wrote:
> On 11/26/06, iain duncan <iaind...@telus.net> wrote:
> >
> > What's the best way to go about doing that? Not something I've done in
> > python so I'm unaware of the library issues and any snags I might come
> > across.
>
> TurboMail[1][2] has worked very well for me.
>
> [1]: http://cheeseshop.python.org/pypi/TurboMail
> [2]: http://www.topfloor.ca/turbomail/documentation/reference/

The docs there give the config options, but don't tell me where to put
them! I don't know if these go in my gears config ( though putting them
in dev.cfg is causing errors ) or if there is another config file hiding
somewhere, or if I need to make one. Any tips?

Thanks
Iain

>

iain duncan

unread,
Nov 25, 2006, 10:39:56 PM11/25/06
to turbo...@googlegroups.com
On Sat, 2006-25-11 at 19:16 -0800, iain duncan wrote:
> On Sun, 2006-26-11 at 02:06 +0000, Lee McFadden wrote:
> > On 11/26/06, iain duncan <iaind...@telus.net> wrote:
> > >
> > > What's the best way to go about doing that? Not something I've done in
> > > python so I'm unaware of the library issues and any snags I might come
> > > across.
> >
> > TurboMail[1][2] has worked very well for me.
> >
> > [1]: http://cheeseshop.python.org/pypi/TurboMail
> > [2]: http://www.topfloor.ca/turbomail/documentation/reference/

Ok, I got it going, but don't seem to be actually making mail happen. If
I put my home emails mail server in the server config line, should that
mean that I can send out email through my regular email connection or
will I need a mail server on my dev box to do so?

Thanks
Iain

Jorge Vargas

unread,
Nov 26, 2006, 9:34:44 AM11/26/06
to turbo...@googlegroups.com
On 11/26/06, iain duncan <iaind...@telus.net> wrote:
>
> Ok, I got it going, but don't seem to be actually making mail happen. If
> I put my home emails mail server in the server config line, should that
> mean that I can send out email through my regular email connection or
> will I need a mail server on my dev box to do so?
set
mail.debug = True and check the logs, you should need a normal valid
mail server like the one your ISP has, but beware a program sending
automatic email could be label as spam.
>
> Thanks
> Iain
>
>
> >
>

iain duncan

unread,
Nov 26, 2006, 9:10:37 PM11/26/06
to turbo...@googlegroups.com

Thanks for the tip. Yup, I need to send from my actual account name or
the isp blocks it.
Iain


Matthew Bevan

unread,
Dec 4, 2006, 2:07:38 PM12/4/06
to turbo...@googlegroups.com
Howdy!

>> TurboMail[1][2] has worked very well for me.
>>
>> [1]: http://cheeseshop.python.org/pypi/TurboMail
>> [2]: http://www.topfloor.ca/turbomail/documentation/reference/
>
> The docs there give the config options, but don't tell me where to
> put them! I don't know if these go in my gears config ( though
> putting them in dev.cfg is causing errors ) or if there is another
> config file hiding somewhere, or if I need to make one. Any tips?

The configuration options can go in your dev.cfg, prod.cfg, or
project/config/app.cfg, and can even be split between them, e.g.
having the .server, .username, and .password entries in dev.cfg and
prod.cfg, and everything else in app.cfg. At a bare minimum
TurboMail requires:

mail.on = True
mail.server = "mail.server.tld"

If your e-mail server requires authentication, add the following:

mail.username = "myuser"
mail.password = 'mypass'

> Ok, I got it going, but don't seem to be actually making mail
> happen. If I put my home emails mail server in the server config
> line, should that mean that I can send out email through my regular
> email connection or will I need a mail server on my dev box to do so?

If you know that your e-mail server does not support TLS
(encryption), then add the following line to disable automatic testing:

mail.tls = False

Additional information can be displayed by enabling mail.debug which
may help track down any problems.

For my testing (dev.cfg) I use our primary (company-wide) mail
server. It is outside our network, allows TLS, and requires
authentication. In the production environment for our projects
(prod.cfg) the mail server is 'localhost', but the other requirements
are the same - TLS and authentication.

If you are on a standard SOHO or non-commercial internet connection,
outbound requests on port 25 (SMTP) may be blocked. To get around
this many mail servers run on both port 25 and port 2500. Simply add
a colon and the port number after the server name. E.g.:

mail.server = "mail.server.tld:2500"

Have a great day,

Matthew Bevan, Systems Administrator
Top Floor Computer Systems Ltd.


Reply all
Reply to author
Forward
0 new messages