[web2py] Re: Sending email w/ text & html

2016-04-13 Thread Leonel Câmara
It does send both the text and the HTML, the thing is that the HTML is 
placed in the email as a multipart/alternative to the text. 
multipart/alternative is used when each of the parts is an "alternative" 
version of the same information. Your email client then picks which one to 
show, since you're using an email client that can display HTML it chooses 
the HTML version. 

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Sending email w/ text & html

2016-04-13 Thread Scott Hunter
I tried this, but to no effect: only the HTML portion appears in the 
message, as before.

- Scott

On Tuesday, April 12, 2016 at 11:12:30 PM UTC-4, H. Das wrote:
>
> Hi can you try:
>
> mail.send(to='y...@example.com', subject=subject, message=msg, 
> headers={'Content-Type' : 'text/html'})
>
> On Tuesday, April 12, 2016 at 8:28:56 PM UTC-4, Scott Hunter wrote:
>
>> According to the current book, I should be able to do this:
>>
>> mail.send('y...@example.com',
>>   'Message subject',
>>   ('Plain text body', 'html body'))
>>
>>
>> When I try:
>>
>> msg = ("Text only","HTML Only")
>> mail.send(to='y...@example.com', subject=subject, 
>> message=msg )
>>
>>
>> the text part does not appear in the received email, only the HTML part.
>>
>> Is this a bug, or am I mis-reading the documentation?
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Sending email w/ text & html

2016-04-12 Thread H. Das
Hi can you try:

mail.send(to='y...@example.com', subject=subject, message=msg, 
headers={'Content-Type' : 'text/html'})

On Tuesday, April 12, 2016 at 8:28:56 PM UTC-4, Scott Hunter wrote:

> According to the current book, I should be able to do this:
>
> mail.send('y...@example.com ',
>   'Message subject',
>   ('Plain text body', 'html body'))
>
>
> When I try:
>
> msg = ("Text only","HTML Only")
> mail.send(to='y...@example.com ', 
> subject=subject, message=msg )
>
>
> the text part does not appear in the received email, only the HTML part.
>
> Is this a bug, or am I mis-reading the documentation?
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Sending email through gmail account: no SSL support

2016-03-02 Thread Michele Comitini
that problem could be simply related to python process not finding the
openssl shared lib at runtime.  So the module can be imported, but the
socket cannot work with ssl.

2016-03-02 9:24 GMT+01:00 Niphlod :

> uhm. this error
>
> :No SSL support included in this Python
>
> is an early exit on smptlib . not at all web2py related: SO is riddled
> with same error, and all points to not having SSL available...
>
> On Wednesday, March 2, 2016 at 1:53:05 AM UTC+1, Leonel Câmara wrote:
>>
>> Have you allowed insecure apps on this gmail's google account?
>>
>> https://support.google.com/accounts/answer/6010255?hl=en
>>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Sending email through gmail account: no SSL support

2016-03-02 Thread Niphlod
uhm. this error 

:No SSL support included in this Python

is an early exit on smptlib . not at all web2py related: SO is riddled with 
same error, and all points to not having SSL available...

On Wednesday, March 2, 2016 at 1:53:05 AM UTC+1, Leonel Câmara wrote:
>
> Have you allowed insecure apps on this gmail's google account?
>
> https://support.google.com/accounts/answer/6010255?hl=en
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Sending email through gmail account: no SSL support

2016-03-01 Thread Leonel Câmara
Have you allowed insecure apps on this gmail's google account?

https://support.google.com/accounts/answer/6010255?hl=en

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Sending email through gmail account: no SSL support

2016-03-01 Thread Marty Jones
That works fine as well.

On Tuesday, March 1, 2016 at 3:32:43 AM UTC-6, Niphlod wrote:
>
> what if you just
>
> import ssl 
>
> ?
>
> which environment are you in (os details) ?
>
> On Tuesday, March 1, 2016 at 12:36:16 AM UTC+1, Marty Jones wrote:
>>
>> I can't recall at this point, but just ran:
>>
>> >>> import socket
>> >>> hasattr(socket, "ssl")
>>
>> which returned True
>>
>> On Monday, February 29, 2016 at 4:15:53 PM UTC-6, Niphlod wrote:
>>>
>>> with or without ssl support ? did you compile it yourself ?
>>>
>>> On Monday, February 29, 2016 at 10:57:58 PM UTC+1, Marty Jones wrote:

 2.7.11

 On Monday, February 29, 2016 at 2:20:00 PM UTC-6, Niphlod wrote:
>
> what python are you using ?
>
> On Monday, February 29, 2016 at 4:39:45 PM UTC+1, Marty Jones wrote:
>>
>> I'm trying to send an email using web2py's auth mailer. I've set an 
>> application specific password and am using that and my gmail info in the 
>> code below:
>> mail = auth.settings.mailer
>> mail.settings.server = 'smtp.gmail.com:587'
>> mail.settings.sender = 'em...@gmail.com'
>> mail.settings.login = 'em...@gmail.com:password'
>>
>>
>> I'm getting an error back when trying to send an email:
>> 2016-02-29 09:33:42,082 - web2py - WARNING - Mail.send failure:No 
>> SSL support included in this Python
>>
>> Anyone experienced this and know how to work around it?
>>
>> Using port 465 instead results in this error:
>> 2016-02-29 09:32:17,565 - web2py - WARNING - Mail.send failure:
>> Connection unexpectedly closed: timed out
>>
>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Sending email through gmail account: no SSL support

2016-03-01 Thread Niphlod
what if you just

import ssl 

?

which environment are you in (os details) ?

On Tuesday, March 1, 2016 at 12:36:16 AM UTC+1, Marty Jones wrote:
>
> I can't recall at this point, but just ran:
>
> >>> import socket
> >>> hasattr(socket, "ssl")
>
> which returned True
>
> On Monday, February 29, 2016 at 4:15:53 PM UTC-6, Niphlod wrote:
>>
>> with or without ssl support ? did you compile it yourself ?
>>
>> On Monday, February 29, 2016 at 10:57:58 PM UTC+1, Marty Jones wrote:
>>>
>>> 2.7.11
>>>
>>> On Monday, February 29, 2016 at 2:20:00 PM UTC-6, Niphlod wrote:

 what python are you using ?

 On Monday, February 29, 2016 at 4:39:45 PM UTC+1, Marty Jones wrote:
>
> I'm trying to send an email using web2py's auth mailer. I've set an 
> application specific password and am using that and my gmail info in the 
> code below:
> mail = auth.settings.mailer
> mail.settings.server = 'smtp.gmail.com:587'
> mail.settings.sender = 'em...@gmail.com'
> mail.settings.login = 'em...@gmail.com:password'
>
>
> I'm getting an error back when trying to send an email:
> 2016-02-29 09:33:42,082 - web2py - WARNING - Mail.send failure:No SSL 
> support included in this Python
>
> Anyone experienced this and know how to work around it?
>
> Using port 465 instead results in this error:
> 2016-02-29 09:32:17,565 - web2py - WARNING - Mail.send failure:
> Connection unexpectedly closed: timed out
>
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Sending email through gmail account: no SSL support

2016-02-29 Thread Marty Jones
I can't recall at this point, but just ran:

>>> import socket
>>> hasattr(socket, "ssl")

which returned True

On Monday, February 29, 2016 at 4:15:53 PM UTC-6, Niphlod wrote:
>
> with or without ssl support ? did you compile it yourself ?
>
> On Monday, February 29, 2016 at 10:57:58 PM UTC+1, Marty Jones wrote:
>>
>> 2.7.11
>>
>> On Monday, February 29, 2016 at 2:20:00 PM UTC-6, Niphlod wrote:
>>>
>>> what python are you using ?
>>>
>>> On Monday, February 29, 2016 at 4:39:45 PM UTC+1, Marty Jones wrote:

 I'm trying to send an email using web2py's auth mailer. I've set an 
 application specific password and am using that and my gmail info in the 
 code below:
 mail = auth.settings.mailer
 mail.settings.server = 'smtp.gmail.com:587'
 mail.settings.sender = 'em...@gmail.com'
 mail.settings.login = 'em...@gmail.com:password'


 I'm getting an error back when trying to send an email:
 2016-02-29 09:33:42,082 - web2py - WARNING - Mail.send failure:No SSL 
 support included in this Python

 Anyone experienced this and know how to work around it?

 Using port 465 instead results in this error:
 2016-02-29 09:32:17,565 - web2py - WARNING - Mail.send failure:
 Connection unexpectedly closed: timed out




-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Sending email through gmail account: no SSL support

2016-02-29 Thread Niphlod
with or without ssl support ? did you compile it yourself ?

On Monday, February 29, 2016 at 10:57:58 PM UTC+1, Marty Jones wrote:
>
> 2.7.11
>
> On Monday, February 29, 2016 at 2:20:00 PM UTC-6, Niphlod wrote:
>>
>> what python are you using ?
>>
>> On Monday, February 29, 2016 at 4:39:45 PM UTC+1, Marty Jones wrote:
>>>
>>> I'm trying to send an email using web2py's auth mailer. I've set an 
>>> application specific password and am using that and my gmail info in the 
>>> code below:
>>> mail = auth.settings.mailer
>>> mail.settings.server = 'smtp.gmail.com:587'
>>> mail.settings.sender = 'em...@gmail.com'
>>> mail.settings.login = 'em...@gmail.com:password'
>>>
>>>
>>> I'm getting an error back when trying to send an email:
>>> 2016-02-29 09:33:42,082 - web2py - WARNING - Mail.send failure:No SSL 
>>> support included in this Python
>>>
>>> Anyone experienced this and know how to work around it?
>>>
>>> Using port 465 instead results in this error:
>>> 2016-02-29 09:32:17,565 - web2py - WARNING - Mail.send failure:
>>> Connection unexpectedly closed: timed out
>>>
>>>
>>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Sending email through gmail account: no SSL support

2016-02-29 Thread Marty Jones
2.7.11

On Monday, February 29, 2016 at 2:20:00 PM UTC-6, Niphlod wrote:
>
> what python are you using ?
>
> On Monday, February 29, 2016 at 4:39:45 PM UTC+1, Marty Jones wrote:
>>
>> I'm trying to send an email using web2py's auth mailer. I've set an 
>> application specific password and am using that and my gmail info in the 
>> code below:
>> mail = auth.settings.mailer
>> mail.settings.server = 'smtp.gmail.com:587'
>> mail.settings.sender = 'em...@gmail.com'
>> mail.settings.login = 'em...@gmail.com:password'
>>
>>
>> I'm getting an error back when trying to send an email:
>> 2016-02-29 09:33:42,082 - web2py - WARNING - Mail.send failure:No SSL 
>> support included in this Python
>>
>> Anyone experienced this and know how to work around it?
>>
>> Using port 465 instead results in this error:
>> 2016-02-29 09:32:17,565 - web2py - WARNING - Mail.send failure:Connection 
>> unexpectedly closed: timed out
>>
>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Sending email through gmail account: no SSL support

2016-02-29 Thread Niphlod
what python are you using ?

On Monday, February 29, 2016 at 4:39:45 PM UTC+1, Marty Jones wrote:
>
> I'm trying to send an email using web2py's auth mailer. I've set an 
> application specific password and am using that and my gmail info in the 
> code below:
> mail = auth.settings.mailer
> mail.settings.server = 'smtp.gmail.com:587'
> mail.settings.sender = 'em...@gmail.com '
> mail.settings.login = 'em...@gmail.com:password'
>
>
> I'm getting an error back when trying to send an email:
> 2016-02-29 09:33:42,082 - web2py - WARNING - Mail.send failure:No SSL 
> support included in this Python
>
> Anyone experienced this and know how to work around it?
>
> Using port 465 instead results in this error:
> 2016-02-29 09:32:17,565 - web2py - WARNING - Mail.send failure:Connection 
> unexpectedly closed: timed out
>
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: sending email

2015-07-07 Thread Chaitu P
Thank you so much, that got worked.

On Sun, Jul 5, 2015 at 4:47 PM, Jose C  wrote:

> Hmm...are you running your code on a webfaction server or on another
> machine?
>
> If not running on a webfaction server you'll need to connect to port 587
> like so:
> mail.settings.server = 'smtp.webfaction.com
> :587'
>
>
>
>  --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Chaitanya Pochampally

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: sending email

2015-07-05 Thread Jose C
Hmm...are you running your code on a webfaction server or on another 
machine?

If not running on a webfaction server you'll need to connect to port 587 
like so: 
mail.settings.server = 'smtp.webfaction.com 
:587'  



-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: sending email

2015-07-05 Thread Chaitu P
Hello,

Thank you for the reply.
Iam still getting the below error.

WARNING:web2py:Mail.send failure:[Errno 10060] A connection attempt failed
because the connected party did not properly respond after a period of
time, or estab
lished connection failed because connected host has failed to respond







On Sun, Jul 5, 2015 at 9:28 AM, Jose C  wrote:

> Your mail settings in db.py should be:
>
> mail.settings.server = 'smtp.webfaction.com
> '
> mail.settings.sender = 'an email address that you have created(in the
> webfaction panel->Emails->Email Addresses section)'
> mail.settings.login = 'a_mailbox_name(created in webfaction
> panel->Emails->Mailboxes section):password_for_this_mailbox'
>
>  --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Chaitanya Pochampally

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: sending email

2015-07-05 Thread Jose C
Your mail settings in db.py should be:

mail.settings.server = 'smtp.webfaction.com ' 
 
mail.settings.sender = 'an email address that you have created(in the 
webfaction panel->Emails->Email Addresses section)'
mail.settings.login = 'a_mailbox_name(created in webfaction 
panel->Emails->Mailboxes section):password_for_this_mailbox'

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: sending email

2015-06-24 Thread Michael Beller
If you have two factor auth enabled in gmail you need to authorize app and 
generate unique password

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: sending email

2015-06-23 Thread 黄祥
assuming you use web2py latest version (there is appconfig.ini on folder 
private), please try
models/db.py
mail = auth.settings.mailer
mail.settings.server = 'logging' if request.is_local else 
myconf.take('smtp.sender')
mail.settings.sender = myconf.take('smtp.sender')
mail.settings.login = myconf.take('smtp.login')

private/appconfig.ini
[smtp]
server = smtp.gmail.com:587
sender = usern...@gmail.com
login  = username:password

best regards,
stifan

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: sending email

2015-06-23 Thread Chaitu P
thank you for your reply Stifan.
Iam able to send it to the console. But when Iam trying to send it to
gmail, its getting failed.
This is the code I used.

from gluon.tools import Mail
mail = Mail()
mail.settings.server = 'logging'
mail.settings.sender = 'y...@example.com'
mail.settings.login = 'None

This is the code used for sending to gmail.
from gluon.tools import Mail
mail = Mail()
mail.settings.server = 'smtp.gmail.com:25'
mail.settings.sender = 'm...@gmail.com'
mail.settings.login = 'm...@gmail.com:pswd'

Can you please let me know what mistake Iam doing.


'

On Sun, Jun 21, 2015 at 11:57 AM, 黄祥  wrote:

> please read the book, with ascending order.
> 1. setting up email (normally in models/db.py)
> 2. sending email (can be put in models, controllers or modules)
>
> best regards,
> stifan
>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Chaitanya Pochampally

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: sending email

2015-06-22 Thread Dave S


On Sunday, June 21, 2015 at 9:57:54 AM UTC-7, 黄祥 wrote:
>
> please read the book, with ascending order.
> 1. setting up email (normally in models/db.py)
> 2. sending email (can be put in models, controllers or modules)
>
>

Also, if you are trying out some code and getting errors, it may be a good 
idea to show what that code looks like (by pasting a copy of it in your 
message); at present your question is vague and general, and so it is hard 
to give a specific answer to your question.

/dps

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: sending email

2015-06-21 Thread 黄祥
please read the book, with ascending order.
1. setting up email (normally in models/db.py)
2. sending email (can be put in models, controllers or modules)

best regards,
stifan

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Sending email from server

2014-11-18 Thread Yang
It was caused by selinux. soloved by enabling the httpd_can_sendmail. Thank 
you for all the help! 

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Sending email from server

2014-11-14 Thread Niphlod
so the problem is that your server can't reach the smtp server. not a 
web2py issue.

On Friday, November 14, 2014 11:39:28 AM UTC+1, Yang wrote:
>
>
> On Friday, November 14, 2014 12:37:19 AM UTC+1, Niphlod wrote:
>>
>> well, to be nerdy.
>>
>> import telnetlib
>> tn = telnetlib.Telnet(hostname, 25, 10)
>>
>>
>> or (even better ?!)
>>
>> import socket
>> s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
>> s.settimeout(2)
>> try:
>> s.connect((host, 25))
>> print 'i can reach it'
>> except:
>> print "can't reach it"
>>
>>
> Hello Niphlod, thank you for your reply. I tried both but return the same 
> error permission denied. 
>
>  
>
>>
>> On Wednesday, November 12, 2014 9:26:52 PM UTC+1, Leonel Câmara wrote:
>>>
>>> Well it would be easier to test stuff if you had telnet yes. You just 
>>> need the telnet client so it's not much of a security risk. If you have an 
>>> admin, however, you can just ask him to do his job and tell you what are 
>>> the correct settings for your app to be able to send emails since these 
>>> don't work.
>>>
>>
> I talked to the admin while they have no clue neither.
> I checked a little more and found maybe the problem is the selinux, as 
> talked here 
>
> http://stackoverflow.com/questions/12804841/how-can-apache-be-allowed-to-send-email
>
> I am asking the admin to try this, will post the results then.
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Sending email from server

2014-11-14 Thread Yang

On Friday, November 14, 2014 12:37:19 AM UTC+1, Niphlod wrote:
>
> well, to be nerdy.
>
> import telnetlib
> tn = telnetlib.Telnet(hostname, 25, 10)
>
>
> or (even better ?!)
>
> import socket
> s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
> s.settimeout(2)
> try:
> s.connect((host, 25))
> print 'i can reach it'
> except:
> print "can't reach it"
>
>
Hello Niphlod, thank you for your reply. I tried both but return the same 
error permission denied. 

 

>
> On Wednesday, November 12, 2014 9:26:52 PM UTC+1, Leonel Câmara wrote:
>>
>> Well it would be easier to test stuff if you had telnet yes. You just 
>> need the telnet client so it's not much of a security risk. If you have an 
>> admin, however, you can just ask him to do his job and tell you what are 
>> the correct settings for your app to be able to send emails since these 
>> don't work.
>>
>
I talked to the admin while they have no clue neither.
I checked a little more and found maybe the problem is the selinux, as 
talked here 
http://stackoverflow.com/questions/12804841/how-can-apache-be-allowed-to-send-email

I am asking the admin to try this, will post the results then.

On Wednesday, November 12, 2014 9:26:52 PM UTC+1, Leonel Câmara wrote:
Well it would be easier to test stuff if you had telnet yes. You just need 
the telnet client so it's not much of a security risk. If you have an 
admin, however, you can just ask him to do his job and tell you what are 
the correct settings for your app to be able to send emails since these 
don't work. 

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Sending email from server

2014-11-13 Thread Niphlod
well, to be nerdy.

import telnetlib
tn = telnetlib.Telnet(hostname, 25, 10)


or (even better ?!)

import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.settimeout(2)
try:
s.connect((host, 25))
print 'i can reach it'
except:
print "can't reach it"


On Wednesday, November 12, 2014 9:26:52 PM UTC+1, Leonel Câmara wrote:
>
> Well it would be easier to test stuff if you had telnet yes. You just need 
> the telnet client so it's not much of a security risk. If you have an 
> admin, however, you can just ask him to do his job and tell you what are 
> the correct settings for your app to be able to send emails since these 
> don't work.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Sending email from server

2014-11-12 Thread Leonel Câmara
Well it would be easier to test stuff if you had telnet yes. You just need 
the telnet client so it's not much of a security risk. If you have an 
admin, however, you can just ask him to do his job and tell you what are 
the correct settings for you app to be able to send emails since these 
don't work.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Sending email from server

2014-11-12 Thread Yang
Tried but telnet is not installed should I ask my administrator to 
install it?

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Sending email from server

2014-11-12 Thread Leonel Câmara
Can you?
telnet mydomain 25

Does it connect?

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Sending email from server

2014-11-12 Thread Yang
Hello Leonel, thank you for your reply. Then how could I find the reason 
for the failure? 
I tried the way you suggested in this page:
https://groups.google.com/forum/#!searchin/web2py/mail.settings.hostname/web2py/pZT38v_s5OI/9Og3cQefLkkJ.
 

However, the code "server = smtplib.SMTP('mydomain', 25)" returns the same 
error "error: [Errno 13] Permission denied".
I also tried this in python command line on the server with the same 
setting, which works fine. 


On Tuesday, November 11, 2014 5:44:22 PM UTC+1, Leonel Câmara wrote:
>
> That's not due to apache settings, that's due to the way you configured 
> web2py mail settings or your mail server configuration. Permission denied 
> can be caused because you didn't set mail.settings.login correctly, it can 
> be because you didn't set mail.settings.hostname to a hostname your mail 
> server is configured to allow, etc. It can be for many different reasons.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Sending email from server

2014-11-11 Thread Leonel Câmara
That's not due to apache settings, that's due to the way you configured 
web2py mail settings or your mail server configuration. Permission denied 
can be caused because you didn't set mail.settings.login correctly, it can 
be because you didn't set mail.settings.hostname to a hostname your mail 
server is configured to allow, etc. It can be for many different reasons.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Sending email with html links

2013-04-03 Thread jjg0
Ahhh I was forgetting the 'http://'

Thanks for the help.

On Tuesday, April 2, 2013 10:56:51 PM UTC-4, Anthony wrote:
>
> Yahoo Mail is re-writing the links. Probably not working correctly because 
> the URLs are missing the leading "http://"; so are treated as relative 
> links, which don't make sense in emails.
>
> Anthony
>
> On Tuesday, April 2, 2013 7:39:23 PM UTC-4, jjg0 wrote:
>>
>> I'm trying to send an email with html and links to pages. 
>>
>> Simple example of what I am doing:
>>
>> testlink = 'www.yahoo.com' 
>> email_body = "Testing Emails with HTML> href='%s' target='new'>first link testsecond 
>> link test" % testlink
>> mail.send(to=['myyah...@yahoo.com'],
>>   subject='testing links',
>>   message=email_body)
>>
>>
>> Details:
>> -There are two links, one using %s with testlink and one just using > href='www.yahoo.com'> I am trying both ways just to play around with the 
>> emails and python, still new to a lot of this and learning.
>> -The mail is working, it sends to my yahoo account just fine
>> -I know I can get html emails in my yahoo account because I've gotten 
>> other working emails with html and links in them.
>> -I'm pretty sure the html part is working because I see the text 
>> correctly, the 's are working, and the text to the links are underlined 
>> as if they are links, however they aren't actually links to anything.  
>> -I am using google app engine and my gmail account to send this email.
>>
>> To be clear, I get an email that looks like this:
>>
>> Testing Emails with HTML
>> first link test  <--This is blue and underlined, but when I 
>> hover the mouse over it it is not actually a link
>> second link test <- This is blue and underlined, but when I hover 
>> the mouse over it it is not actually a link
>>
>> When I view the page source for these links I see something like this: 
>>
>> second link test
>>
>>
>> How does this: 
>> second link test
>>
>> get translated to this: 
>>
>> second link test
>>
>> ??
>>
>>
>> I can't figure out why the links aren't showing up correctly. Is there 
>> something wrong with my code? Something I can't do with gae or yahoo? What 
>> am I doing wrong?
>>
>> Thanks
>>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: Sending email with html links

2013-04-02 Thread Anthony
Also, as noted at the end of this 
section,
 
if using the URL() function to generate links in emails, be sure to specify 
the scheme and host arguments in order to get absolute rather than relative 
URLs.

Anthony

On Tuesday, April 2, 2013 10:56:51 PM UTC-4, Anthony wrote:
>
> Yahoo Mail is re-writing the links. Probably not working correctly because 
> the URLs are missing the leading "http://"; so are treated as relative 
> links, which don't make sense in emails.
>
> Anthony
>
> On Tuesday, April 2, 2013 7:39:23 PM UTC-4, jjg0 wrote:
>>
>> I'm trying to send an email with html and links to pages. 
>>
>> Simple example of what I am doing:
>>
>> testlink = 'www.yahoo.com' 
>> email_body = "Testing Emails with HTML> href='%s' target='new'>first link testsecond 
>> link test" % testlink
>> mail.send(to=['myyah...@yahoo.com'],
>>   subject='testing links',
>>   message=email_body)
>>
>>
>> Details:
>> -There are two links, one using %s with testlink and one just using > href='www.yahoo.com'> I am trying both ways just to play around with the 
>> emails and python, still new to a lot of this and learning.
>> -The mail is working, it sends to my yahoo account just fine
>> -I know I can get html emails in my yahoo account because I've gotten 
>> other working emails with html and links in them.
>> -I'm pretty sure the html part is working because I see the text 
>> correctly, the 's are working, and the text to the links are underlined 
>> as if they are links, however they aren't actually links to anything.  
>> -I am using google app engine and my gmail account to send this email.
>>
>> To be clear, I get an email that looks like this:
>>
>> Testing Emails with HTML
>> first link test  <--This is blue and underlined, but when I 
>> hover the mouse over it it is not actually a link
>> second link test <- This is blue and underlined, but when I hover 
>> the mouse over it it is not actually a link
>>
>> When I view the page source for these links I see something like this: 
>>
>> second link test
>>
>>
>> How does this: 
>> second link test
>>
>> get translated to this: 
>>
>> second link test
>>
>> ??
>>
>>
>> I can't figure out why the links aren't showing up correctly. Is there 
>> something wrong with my code? Something I can't do with gae or yahoo? What 
>> am I doing wrong?
>>
>> Thanks
>>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: Sending email with html links

2013-04-02 Thread Anthony
Yahoo Mail is re-writing the links. Probably not working correctly because 
the URLs are missing the leading "http://"; so are treated as relative 
links, which don't make sense in emails.

Anthony

On Tuesday, April 2, 2013 7:39:23 PM UTC-4, jjg0 wrote:
>
> I'm trying to send an email with html and links to pages. 
>
> Simple example of what I am doing:
>
> testlink = 'www.yahoo.com' 
> email_body = "Testing Emails with HTML target='new'>first link testsecond link 
> test" % testlink
> mail.send(to=['myyah...@yahoo.com '],
>   subject='testing links',
>   message=email_body)
>
>
> Details:
> -There are two links, one using %s with testlink and one just using  href='www.yahoo.com'> I am trying both ways just to play around with the 
> emails and python, still new to a lot of this and learning.
> -The mail is working, it sends to my yahoo account just fine
> -I know I can get html emails in my yahoo account because I've gotten 
> other working emails with html and links in them.
> -I'm pretty sure the html part is working because I see the text 
> correctly, the 's are working, and the text to the links are underlined 
> as if they are links, however they aren't actually links to anything.  
> -I am using google app engine and my gmail account to send this email.
>
> To be clear, I get an email that looks like this:
>
> Testing Emails with HTML
> first link test  <--This is blue and underlined, but when I 
> hover the mouse over it it is not actually a link
> second link test <- This is blue and underlined, but when I hover 
> the mouse over it it is not actually a link
>
> When I view the page source for these links I see something like this: 
>
> second link test
>
>
> How does this: 
> second link test
>
> get translated to this: 
>
> second link test
>
> ??
>
>
> I can't figure out why the links aren't showing up correctly. Is there 
> something wrong with my code? Something I can't do with gae or yahoo? What 
> am I doing wrong?
>
> Thanks
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: Sending email from background queue

2012-08-13 Thread Florian Letsch
I've accidentally posted this twice. Please have a look at the other 
thread: 
https://groups.google.com/forum/?fromgroups#!topic/web2py/u5R-vGcP580%5B1-25%5D
I answered your question there (emails are added from within the 
application).

On Sunday, 12 August 2012 06:17:15 UTC+12, Anthony wrote:
>
> How are emails added to the database -- does that happen within the 
> application, or also in a script?
>
> On Saturday, August 11, 2012 12:55:40 AM UTC-4, Florian Letsch wrote:
>>
>> *My first post somehow didn't make it to the group, I don't know where 
>> it got lost. Sorry if I submit this twice, I have never participated in a 
>> news group before.*
>>
>> I am trying to set up a background queue for sending email as described 
>> in the web2py book. 
>> http://web2py.com/books/default/chapter/29/8#Sending-messages-using-a-background-task
>>
>> However, emails are only sent when they have been in the database before 
>> starting the script. Emails I add to the database when the queue is running 
>> do not get picked up for some reason. I got it to work by adding an 
>> additional db.commit() before the select() in every loop run. I assume this 
>> should not be needed. Does anyone have an idea why this is not working 
>> without that additional commit?
>>
>> import time
>> while True: 
>> db.commit() # not working without this line 
>> rows = db(db.queue.status=='pending').select()
>> for row in rows:
>> if mail.send(to=row.email,
>> subject=row.subject,
>> message=row.message):
>> row.update_record(status='sent')
>> else:
>> row.update_record(status='failed')
>> db.commit()
>> time.sleep(60) # check every minute
>>
>>
>>

-- 





[web2py] Re: Sending email from background queue

2012-08-11 Thread Anthony
How are emails added to the database -- does that happen within the 
application, or also in a script?

On Saturday, August 11, 2012 12:55:40 AM UTC-4, Florian Letsch wrote:
>
> *My first post somehow didn't make it to the group, I don't know where it 
> got lost. Sorry if I submit this twice, I have never participated in a news 
> group before.*
>
> I am trying to set up a background queue for sending email as described in 
> the web2py book. 
> http://web2py.com/books/default/chapter/29/8#Sending-messages-using-a-background-task
>
> However, emails are only sent when they have been in the database before 
> starting the script. Emails I add to the database when the queue is running 
> do not get picked up for some reason. I got it to work by adding an 
> additional db.commit() before the select() in every loop run. I assume this 
> should not be needed. Does anyone have an idea why this is not working 
> without that additional commit?
>
> import time
> while True: 
> db.commit() # not working without this line 
> rows = db(db.queue.status=='pending').select()
> for row in rows:
> if mail.send(to=row.email,
> subject=row.subject,
> message=row.message):
> row.update_record(status='sent')
> else:
> row.update_record(status='failed')
> db.commit()
> time.sleep(60) # check every minute
>
>
>

-- 





[web2py] Re: sending email with gmail has stopped working

2012-06-27 Thread Brandon Roberts
I have found our firewall was blocking port 587.  Once that was open, my 
emails started sending again. Check with your IT department.  

On Monday, June 11, 2012 6:17:04 AM UTC-4, david.waldrop wrote:
>
> I have several applications that use gmail to send invitations and for 
> authorization.  Recently they have both stopped working in the production 
> environments yet continue to work when running on my development machines. 
>  I have looked at the message boards and tried everything I saw 
> (ensuring the sender is form the same domain, changing the login 
> credentials, etc) but am still stuck.  Here is the basic config:
>
> ## configure email
> mail=auth.settings.mailer
> mail.settings.server = 'smtp.gmail.com:587'
> mail.settings.sender = 'x...@gmail.com'
> mail.settings.login = 'id:pw'
>
> My hunch is gmail is blocking the calls but I do not know how to diagnose 
> or fix.  Any ideas or suggestions would be greatly appreciated.  
>
>
>
>
>
On Monday, June 11, 2012 6:17:04 AM UTC-4, david.waldrop wrote:
>
> I have several applications that use gmail to send invitations and for 
> authorization.  Recently they have both stopped working in the production 
> environments yet continue to work when running on my development machines. 
>  I have looked at the message boards and tried everything I saw 
> (ensuring the sender is form the same domain, changing the login 
> credentials, etc) but am still stuck.  Here is the basic config:
>
> ## configure email
> mail=auth.settings.mailer
> mail.settings.server = 'smtp.gmail.com:587'
> mail.settings.sender = 'x...@gmail.com'
> mail.settings.login = 'id:pw'
>
> My hunch is gmail is blocking the calls but I do not know how to diagnose 
> or fix.  Any ideas or suggestions would be greatly appreciated.  
>
>
>
>
>
On Monday, June 11, 2012 6:17:04 AM UTC-4, david.waldrop wrote:
>
> I have several applications that use gmail to send invitations and for 
> authorization.  Recently they have both stopped working in the production 
> environments yet continue to work when running on my development machines. 
>  I have looked at the message boards and tried everything I saw 
> (ensuring the sender is form the same domain, changing the login 
> credentials, etc) but am still stuck.  Here is the basic config:
>
> ## configure email
> mail=auth.settings.mailer
> mail.settings.server = 'smtp.gmail.com:587'
> mail.settings.sender = 'x...@gmail.com'
> mail.settings.login = 'id:pw'
>
> My hunch is gmail is blocking the calls but I do not know how to diagnose 
> or fix.  Any ideas or suggestions would be greatly appreciated.  
>
>
>
>
>

-- 





[web2py] Re: sending email with gmail has stopped working

2012-06-12 Thread howesc
i've had the unlock problem in the past as well.  though it seems odd that 
it works from some servers and not others.

On Monday, June 11, 2012 7:25:40 PM UTC-7, pbreit wrote:
>
> Works OK for me. Maybe you're blocked?
>
> https://accounts.google.com/b/0/DisplayUnlockCaptcha
>
> Or for Google Apps:
> https://www.google.com/a/[your domain].com/UnlockCaptcha
>


[web2py] Re: sending email with gmail has stopped working

2012-06-11 Thread pbreit
Works OK for me. Maybe you're blocked?

https://accounts.google.com/b/0/DisplayUnlockCaptcha

Or for Google Apps:
https://www.google.com/a/[your domain].com/UnlockCaptcha


[web2py] Re: sending email with gmail has stopped working

2012-06-11 Thread david.waldrop
Still have this issue.  However I am not sure it has anything to do with 
the server being blocked by Google.  Now when I try in my development 
environment the emaisl are failing as well.  I have tried using the same 
original gmail credentials, as well as a different smtp server 
and corresponding account, but the send still fails with the following 
message

WARNING:web2py.Mail.send failure:(10060, 'Operation timed out')

Has anyone else encountered this in the past?  Is anyone else having this 
issue with gmail now?


Re: [web2py] Re: Sending email with localhost / Postfix

2012-05-26 Thread Jonathan Lundell
On May 26, 2012, at 8:41 AM, Yarin wrote:
> Got this working on the CentOS server as follows:
> 
> mail.settings.server = 'localhost:25'
> mail.settings.sender = 'y...@mail.com'
> mail.settings.login = None
> 
> 
> Massimo, please note the book says "Set mail.settings.login=False if the SMTP 
> server does not require authentication." 
> This was failing for me- It only worked when 
> mail.settings.login = None
> 

This appears to be fixed in the trunk (but it wouldn't hurt to say None in the 
book).


> On Saturday, May 26, 2012 10:24:27 AM UTC-4, Yarin wrote:
> I'm trying to send email out of web2py via localhost and Postfix, but 
> everything I try just fails silently. Having the same issue on my Mac OSX and 
> CentOS6 server, each with Postfix installed and able to send emails from the 
> command line.
> 
> I've played with variations of the following settings:
> 
> mail.settings.server='127.0.0.1:25' / 'smtp.localhost:25' / 'localhost' / 
> 'localhost:25'
> mail.settings.sender='y...@example.com'
> mail.settings.login='' / False / None
> 
> 
> Sending mail via gmail SMTP works fine, but I need local postfix capability




[web2py] Re: Sending email with localhost / Postfix

2012-05-26 Thread Yarin
Got this working on the CentOS server as follows:

mail.settings.server = 'localhost:25'
mail.settings.sender = 'y...@mail.com'
mail.settings.login = None


Massimo, please note the book says "Set mail.settings.login=False if the 
SMTP server does not require authentication." 
This was failing for me- It only worked when 
mail.settings.login = None



On Saturday, May 26, 2012 10:24:27 AM UTC-4, Yarin wrote:
>
> I'm trying to send email out of web2py via localhost and Postfix, but 
> everything I try just fails silently. Having the same issue on my Mac OSX 
> and CentOS6 server, each with Postfix installed and able to send emails 
> from the command line.
>
> I've played with variations of the following settings:
>
> mail.settings.server='127.0.0.1:25' / 'smtp.localhost:25' / 'localhost' / 
> 'localhost:25'
> mail.settings.sender='y...@example.com'
> mail.settings.login='' / False / None
>
>
> Sending mail via gmail SMTP works fine, but I need local postfix capability
>


[web2py] Re: Sending email with localhost / Postfix

2012-05-26 Thread Massimo Di Pierro
Something is wrong with postfilx configuration. Use a python shell and try 
the smtplib library directly. I use postfix all the time and nothing has 
change in those parts of web2py.

On Saturday, 26 May 2012 09:24:27 UTC-5, Yarin wrote:
>
> I'm trying to send email out of web2py via localhost and Postfix, but 
> everything I try just fails silently. Having the same issue on my Mac OSX 
> and CentOS6 server, each with Postfix installed and able to send emails 
> from the command line.
>
> I've played with variations of the following settings:
>
> mail.settings.server='127.0.0.1:25' / 'smtp.localhost:25' / 'localhost' / 
> 'localhost:25'
> mail.settings.sender='y...@example.com'
> mail.settings.login='' / False / None
>
>
> Sending mail via gmail SMTP works fine, but I need local postfix capability
>


Re: [web2py] Re: Sending email from form with multiple documents

2012-01-25 Thread Bruno Rocha
Nice! thanks for sharing!

On Wed, Jan 25, 2012 at 6:13 PM, Omi Chiba  wrote:

> Solved !
>
> Please refer the slice if you're interested.
> http://www.web2pyslices.com/slices/take_slice/150
>
>
>
> On Jan 25, 9:21 am, Omi Chiba  wrote:
> > I was creating a simple app which will send email with a single document
> > and it works fine. I found Paolo's post to handle multiple documents and
> > tried. It worked great but I have two problems.
> >
> > Paolo's posthttps://
> groups.google.com/group/web2py/browse_thread/thread/5e99d46f6...
> >
> > Problem
> > 1. Upload files are not saved under the app directories
> > 2. And how can I retrieve the new file names (I could use
> > "form.vars.attachment_newfilename" for a single document but not sure If
> I
> > can use it for multiple documents)
> >
> > Controller
> > ==
> > def index():
> > import os
> > filepath = os.path.join(request.folder,'uploads')
> > form=SQLFORM.factory(Field('subject',requires=IS_NOT_EMPTY()),
> > Field('message','text',requires=IS_NOT_EMPTY()),
> >
> Field('attachment','upload',uploadfolder=filepath)
> > )
> >
> > if form.accepts(request):
> > counter = 0
> > text = ""
> > for var in request.vars:
> >  if var.startswith('attachment') and request.vars[var] != '':
> >  counter += 1
> >  text += " " + request.vars[var].filename
> > response.flash = str(counter) + text
> >
> > # Send Email
> > """
> > mail.send('och...@xxx.com',
> > request.vars.subject,
> > request.vars.messagei
> > attachments = [Mail.Attachment(filepath + '/' +
> > form.vars.attachment_newfilename,
> >
>  filename=request.vars.attachment.filename)]
> >  )
> > """
> > return dict(form=form)
> >
> > View
> > =
> >
> {{response.files.extend([URL('static','css/multiupload.css'),URL('static','
> js/jquery.multiupload.js')])}}
> > {{left_sidebar_enabled,right_sidebar_enabled=False,False}}
> > {{extend 'layout.html'}}
> >
> > Send Mail
> > 
> > {{=form}}
> > {{=BEAUTIFY(request.vars)}}
> > 
> > //
> > 
> >
> > 
> >
> >  Email1.PNG
> > 14KViewDownload
> >
> >  Email2.PNG
> > 23KViewDownload




-- 

Bruno Rocha
[http://rochacbruno.com.br]


[web2py] Re: Sending email from form with multiple documents

2012-01-25 Thread Omi Chiba
Solved !

Please refer the slice if you're interested.
http://www.web2pyslices.com/slices/take_slice/150



On Jan 25, 9:21 am, Omi Chiba  wrote:
> I was creating a simple app which will send email with a single document
> and it works fine. I found Paolo's post to handle multiple documents and
> tried. It worked great but I have two problems.
>
> Paolo's 
> posthttps://groups.google.com/group/web2py/browse_thread/thread/5e99d46f6...
>
> Problem
> 1. Upload files are not saved under the app directories
> 2. And how can I retrieve the new file names (I could use
> "form.vars.attachment_newfilename" for a single document but not sure If I
> can use it for multiple documents)
>
> Controller
> ==
> def index():
>     import os
>     filepath = os.path.join(request.folder,'uploads')
>     form=SQLFORM.factory(Field('subject',requires=IS_NOT_EMPTY()),
>                         Field('message','text',requires=IS_NOT_EMPTY()),
>                         Field('attachment','upload',uploadfolder=filepath)
>                         )
>
>     if form.accepts(request):
>         counter = 0
>         text = ""
>         for var in request.vars:
>              if var.startswith('attachment') and request.vars[var] != '':
>                  counter += 1
>                  text += " " + request.vars[var].filename
>         response.flash = str(counter) + text
>
>         # Send Email
>     """
>         mail.send('och...@xxx.com',
>         request.vars.subject,
>         request.vars.messagei
>         attachments = [Mail.Attachment(filepath + '/' +
> form.vars.attachment_newfilename,
>                                  filename=request.vars.attachment.filename)]
>                  )
>     """
>     return dict(form=form)
>
> View
> =
> {{response.files.extend([URL('static','css/multiupload.css'),URL('static',' 
> js/jquery.multiupload.js')])}}
> {{left_sidebar_enabled,right_sidebar_enabled=False,False}}
> {{extend 'layout.html'}}
>
> Send Mail
> 
> {{=form}}
> {{=BEAUTIFY(request.vars)}}
> 
> //
> 
>
> 
>
>  Email1.PNG
> 14KViewDownload
>
>  Email2.PNG
> 23KViewDownload


[web2py] Re: Sending Email Under Linux

2011-10-07 Thread horridohobbyist
That theory don't fly. I have a Seaside app running on a Linux server
at a remote datacenter, and it uses the same
'smtp.broadband.rogers.com:25'.

Richard

On Oct 6, 7:29 am, MidGe  wrote:
> "If 'smtp.broadband.rogers.com:25' works under Windows, why the hell
>
> wouldn't it work under Linux?? Oh well."
>
> Maybe because windows runs a  'smtp.broadband.rogers.com:25'
> whereas Linux has not set such a server by default?!


[web2py] Re: Sending Email Under Linux

2011-10-06 Thread pbreit
It's hard to say. The problem in establishing SMTP connections frequently 
has to do with ports or SSL/TLS. Does Rogers have any information about 
connecting to it?

[web2py] Re: Sending Email Under Linux

2011-10-06 Thread MidGe


"If 'smtp.broadband.rogers.com:25' works under Windows, why the hell 

wouldn't it work under Linux?? Oh well."


Maybe because windows runs a  'smtp.broadband.rogers.com:25' 
whereas Linux has not set such a server by default?!

 



[web2py] Re: Sending Email Under Linux

2011-10-06 Thread horridohobbyist
It would seem that Postfix is configured correctly after all. The
problem seems to be the server I've chosen -- 'smtp.gmail.com:587'
works, but 'smtp.broadband.rogers.com:25' doesn't. WTF.

If 'smtp.broadband.rogers.com:25' works under Windows, why the hell
wouldn't it work under Linux?? Oh well.

Richard

On Oct 6, 2:53 am, Johann Spies  wrote:
> On 6 October 2011 06:42, pbreit  wrote:
>
> > Check /var/log/mail.log
>
> > You might want to review Postfix install instructions for your version of
> > Linux. The Linode help docs are usually really good:
> >http://library.linode.com/email/postfix/gateway-ubuntu-10.10-maverick
>
> > But I think this Ubuntu one might be more helpful:
> >https://help.ubuntu.com/community/Postfix
>
> > The server name is going to be your server's name. As suggested, try
> > running:
>
> > sudo dpkg-reconfigure postfix
>
> Once your postfix is correctly configured, you can configure web2py to
> deliver to locallhost.  Then postfix will handle the email from there.
>
> Regards
> Johann
>
> --
>  May grace and peace be yours in abundance through the full knowledge of God
> and of Jesus our Lord!  His divine power has given us everything we need for
> life and godliness through the full knowledge of the one who called us by
> his own glory and excellence.
>                                                     2 Pet. 1:2b,3a


Re: [web2py] Re: Sending Email Under Linux

2011-10-05 Thread Johann Spies
On 6 October 2011 06:42, pbreit  wrote:

> Check /var/log/mail.log
>
> You might want to review Postfix install instructions for your version of
> Linux. The Linode help docs are usually really good:
> http://library.linode.com/email/postfix/gateway-ubuntu-10.10-maverick
>
> But I think this Ubuntu one might be more helpful:
> https://help.ubuntu.com/community/Postfix
>
> The server name is going to be your server's name. As suggested, try
> running:
>
> sudo dpkg-reconfigure postfix
>
>
Once your postfix is correctly configured, you can configure web2py to
deliver to locallhost.  Then postfix will handle the email from there.

Regards
Johann

-- 
 May grace and peace be yours in abundance through the full knowledge of God
and of Jesus our Lord!  His divine power has given us everything we need for
life and godliness through the full knowledge of the one who called us by
his own glory and excellence.
2 Pet. 1:2b,3a


[web2py] Re: Sending Email Under Linux

2011-10-05 Thread pbreit
Check /var/log/mail.log

You might want to review Postfix install instructions for your version of 
Linux. The Linode help docs are usually really good:
http://library.linode.com/email/postfix/gateway-ubuntu-10.10-maverick

But I think this Ubuntu one might be more helpful:
https://help.ubuntu.com/community/Postfix

The server name is going to be your server's name. As suggested, try 
running:

sudo dpkg-reconfigure postfix



[web2py] Re: Sending Email bug

2010-05-17 Thread Iceberg
On May17, 4:55pm, PanosJee  wrote:
> Hello everyone,
> I am trying to send an email (html and txt) but it fails. I tried to
> simplify my code in order to test it.
>
> mail.send(to='panos...@gmail.com',subject='test',message='test')
>
> But i am getting:
> File "/Users/panosjee/Documents/Work/web2py/gluon/tools.py", line 302,
> in send
>     attachment.attach(MIMEText.MIMEText(text,_charset='utf-8'))
>   File "/Library/Python/2.5/site-packages/email-4.0.2-py2.5.egg/email/
> __init__.py", line 79, in __getattr__
> ImportError: No module named text
>
> Any clue? ( i ve read the tools.py and the text variable should be
> string but web2py i looking for a module ?)


Strange. Try to isolate the problem with fewer code. If you can
reproduce the problem without gluon/tools.py, you probably find a bug
for email lib itself. :)