Hello, I would set up an automatic email response when the user signs up. I am using google apps. I noticed there is a flask-mail extension. However, I could not find any info on how to configure the service. Is there some tutorial or info available? Maybe something specific to gmail or, better, google apps email service? Thanks, Alessio
On 5 February 2012 12:27, Alessio Civitillo <alessiocivitillo@gmail.com> wrote: > I would set up an automatic email response when the user signs up. I am > using google apps. I noticed there is a flask-mail extension. However, I > could not find any info on how to configure the service. > > Is there some tutorial or info available? Maybe something specific to gmail > or, better, google apps email service? I'm not sure if you have seen the docs for the extension, but they are available on http://packages.python.org/flask-mail/ They docs show you how to configure and use it so I think it should be what you are looking for. To use google apps for outgoing mail (SMTP) you need to configure flask-mail with the configuration from this page http://support.google.com/mail/bin/answer.py?hl=en&answer=78799
@Simon, thanks. I did read your docs, but I still had a little bit of problems in dealing with the configuration. As maybe somebody else may have problems with this, I made a simple snippet and posted here: http://flask.pocoo.org/snippets/85/. Alessio On Sun, Feb 5, 2012 at 2:43 PM, Simon Zimmermann <simonz05@gmail.com> wrote: > On 5 February 2012 12:27, Alessio Civitillo <alessiocivitillo@gmail.com> > wrote: > > I would set up an automatic email response when the user signs up. I am > > using google apps. I noticed there is a flask-mail extension. However, I > > could not find any info on how to configure the service. > > > > Is there some tutorial or info available? Maybe something specific to > gmail > > or, better, google apps email service? > > I'm not sure if you have seen the docs for the extension, but they are > available on http://packages.python.org/flask-mail/ > They docs show you how to configure and use it so I think it should be > what you are looking for. To use google apps for outgoing mail (SMTP) > you need to configure flask-mail with the configuration from this page > http://support.google.com/mail/bin/answer.py?hl=en&answer=78799 > -- Regards, ------------------------------------ Alessio Civitillo alessiocivitillo@gmail.com Mobile: (0045) 52645608 Linkedin: http://it.linkedin.com/in/alessiocivitillo
> thanks. I did read your docs, but I still had a little bit of problems in > dealing with the configuration. From the snippet it seems like you managed to figure it out, right? If you didn't, let me know and I'll try to replicate it and test it myself.
> > > thanks. I did read your docs, but I still had a little bit of problems in > > dealing with the configuration. >From the snippet it seems like you managed to figure it out, right? If you didn't, let me know and I'll try to replicate it and test it myself. Hey, thanks. Yes, I did figure it out (thanks to your google support link). But I would suggest to edit the docs and put a simple example for the newbies like me. You can link to my snippet for a google apps example if you want. On Sun, Feb 5, 2012 at 8:13 PM, Simon Zimmermann <simonz05@gmail.com> wrote: > > thanks. I did read your docs, but I still had a little bit of problems in > > dealing with the configuration. > > >From the snippet it seems like you managed to figure it out, right? If > you didn't, let me know and I'll try to replicate it and test it > myself. > -- Regards, ------------------------------------ Alessio Civitillo alessiocivitillo@gmail.com Mobile: (0045) 52645608 Linkedin: http://it.linkedin.com/in/alessiocivitillo
Hi Alessio, On Sun, Feb 5, 2012 at 3:59 PM, Alessio Civitillo <alessiocivitillo@gmail.com> wrote: >>> thanks. I did read your docs, but I still had a little bit of problems >>> in dealing with the configuration. >> >> From the snippet it seems like you managed to figure it out, right? If >> you didn't, let me know and I'll try to replicate it and test it myself. > > Hey, thanks. Yes, I did figure it out (thanks to your google support link). > But I would suggest to edit the docs and put a simple example for the > newbies like me. You can link to my snippet for a google apps example if you > want. What kind of example are you looking for? A complete runnable .py example, given you provide some SMTP configuration? The doc has a code example inline, so I'm looking for more input on how to improve it. -Ron
On Sun, Feb 5, 2012 at 3:59 PM, Alessio Civitillo <alessiocivitillo@gmail.com> wrote: >>> thanks. I did read your docs, but I still had a little bit of problems >>> in dealing with the configuration. >> >> From the snippet it seems like you managed to figure it out, right? If >> you didn't, let me know and I'll try to replicate it and test it myself. > > Hey, thanks. Yes, I did figure it out (thanks to your google support link). > But I would suggest to edit the docs and put a simple example for the > newbies like me. You can link to my snippet for a google apps example if you > want. >What kind of example are you looking for? A complete runnable .py >example, given you provide some SMTP configuration? The doc has a >code example inline, so I'm looking for more input on how to improve >it. The doc is good for experienced people, but I would provide a runnable for the rest because the SMTP configuration is not that straightforward. First, not everybody knows what an SMTP conf should look like. Second, because beginners with Flask could not know what an app.config is. On Mon, Feb 6, 2012 at 1:13 AM, Ron DuPlain <ron.duplain@gmail.com> wrote: > Hi Alessio, > > On Sun, Feb 5, 2012 at 3:59 PM, Alessio Civitillo > <alessiocivitillo@gmail.com> wrote: > >>> thanks. I did read your docs, but I still had a little bit of problems > >>> in dealing with the configuration. > >> > >> From the snippet it seems like you managed to figure it out, right? If > >> you didn't, let me know and I'll try to replicate it and test it myself. > > > > Hey, thanks. Yes, I did figure it out (thanks to your google support > link). > > But I would suggest to edit the docs and put a simple example for the > > newbies like me. You can link to my snippet for a google apps example if > you > > want. > > What kind of example are you looking for? A complete runnable .py > example, given you provide some SMTP configuration? The doc has a > code example inline, so I'm looking for more input on how to improve > it. > > -Ron > -- Regards, ------------------------------------ Alessio Civitillo alessiocivitillo@gmail.com Mobile: (0045) 52645608 Linkedin: http://it.linkedin.com/in/alessiocivitillo
I also agree that the docs are good but could use some work. There's no mention that it sits on top of smtplib, so I had to hunt through the code when I was trying to catch exceptions. Also, signals are tucked away in the testing section. I think the docs needs a few examples of recipes. Such as a wrapper function that returns false if sending fails and logs the error (I have a good start in my recent project). Anthony Ford On Feb 6, 2012 2:15 AM, "Alessio Civitillo" <alessiocivitillo@gmail.com> wrote: > On Sun, Feb 5, 2012 at 3:59 PM, Alessio Civitillo > <alessiocivitillo@gmail.com> wrote: > >>> thanks. I did read your docs, but I still had a little bit of problems > >>> in dealing with the configuration. > >> > >> From the snippet it seems like you managed to figure it out, right? If > >> you didn't, let me know and I'll try to replicate it and test it myself. > > > > Hey, thanks. Yes, I did figure it out (thanks to your google support > link). > > But I would suggest to edit the docs and put a simple example for the > > newbies like me. You can link to my snippet for a google apps example if > you > > want. > > >What kind of example are you looking for? A complete runnable .py > >example, given you provide some SMTP configuration? The doc has a > >code example inline, so I'm looking for more input on how to improve > >it. > > The doc is good for experienced people, but I would provide a runnable for > the rest because the SMTP configuration is not that straightforward. First, > not everybody knows what an SMTP conf should look like. Second, because > beginners with Flask could not know what an app.config is. > > On Mon, Feb 6, 2012 at 1:13 AM, Ron DuPlain <ron.duplain@gmail.com> wrote: > >> Hi Alessio, >> >> On Sun, Feb 5, 2012 at 3:59 PM, Alessio Civitillo >> <alessiocivitillo@gmail.com> wrote: >> >>> thanks. I did read your docs, but I still had a little bit of problems >> >>> in dealing with the configuration. >> >> >> >> From the snippet it seems like you managed to figure it out, right? If >> >> you didn't, let me know and I'll try to replicate it and test >> it myself. >> > >> > Hey, thanks. Yes, I did figure it out (thanks to your google support >> link). >> > But I would suggest to edit the docs and put a simple example for the >> > newbies like me. You can link to my snippet for a google apps example >> if you >> > want. >> >> What kind of example are you looking for? A complete runnable .py >> example, given you provide some SMTP configuration? The doc has a >> code example inline, so I'm looking for more input on how to improve >> it. >> >> -Ron >> > > > > -- > Regards, > ------------------------------------ > Alessio Civitillo > alessiocivitillo@gmail.com > Mobile: (0045) 52645608 > Linkedin: http://it.linkedin.com/in/alessiocivitillo >
You may also want to consider a service such as MailGun which provides a programmatic interface for sending and receiving email. Their basic plan is free. HTH, Max On Feb 5, 2012, at 6:27 AM, Alessio Civitillo wrote: > Hello, > > I would set up an automatic email response when the user signs up. I am using google apps. I noticed there is a flask-mail extension. However, I could not find any info on how to configure the service. > > Is there some tutorial or info available? Maybe something specific to gmail or, better, google apps email service? > > Thanks, > Alessio >
On 5 February 2012 20:28, Max Countryman <maxc@me.com> wrote:
> You may also want to consider a service such as MailGun which provides a
programmatic interface for sending and receiving email. Their basic plan
is free.
Why do you recommend this service? It seems to me that the free plan
they offer does not allow you to set the domain. Your messages will be
sent from foo@bar.mailgun.com. Which is really awful. Correct me if
I'm wrong, though.
You can send from any domain you like. However if you want to receive mail
at a domain AND handle it with their API, you'll have to pay. Otherwise
it's completely free.
Here's a simple example using requests:
requests.post(MAILGUN_API_URL,
auth=('api', MAILGUN_API_KEY),
data={'from': 'you@yourdomain.com',
'to': 'someone@example',
'subject': 'Hi!',
'html': 'How much easier could it be?'})
On Feb 5, 2012, at 3:10 PM, Simon Zimmermann wrote:
> On 5 February 2012 20:28, Max Countryman <maxc@me.com> wrote:
>> You may also want to consider a service such as MailGun which provides
a programmatic interface for sending and receiving email. Their basic plan
is free.
>
> Why do you recommend this service? It seems to me that the free plan
> they offer does not allow you to set the domain. Your messages will be
> sent from foo@bar.mailgun.com. Which is really awful. Correct me if
> I'm wrong, though.
On 5 February 2012 21:48, Max Countryman <maxc@me.com> wrote: > You can send from any domain you like. However if you want to receive mail > at a domain AND handle it with their API, you'll have to pay. Otherwise it's > completely free. > > Here's a simple example using requests: > > requests.post(MAILGUN_API_URL, auth=('api', MAILGUN_API_KEY), data={'from': > 'you@yourdomain.com', 'to': 'someone@example', 'subject': 'Hi!', 'html': > 'How much easier could it be?'}) Rest my case, misinterpreted the documentation they provided.