yes, I've already tryed this way, after looking at tools.py
maybe I'm doing something wrong, I'm going to recheck...

thanks

On 11 Lug, 00:46, mdipierro <mdipie...@cs.depaul.edu> wrote:
> import smtplib
> server = smtplib.SMTP(host, port)
> server.ehlo()
> server.starttls()
> server.ehlo()
> server.login(username, password)
> server.sendmail(sender, to, msg)
> server.quit()
>
> look into the docs for datils. Mind that the docs say .ehlo and .helo
> are the same. They are not. The latter does not work with starttls
>
> On Jul 10, 4:46 pm, kralin <andrea.pierle...@gmail.com> wrote:
>
> > ok, so smtplib should work instead of Mail?
>
> > On 10 Lug, 23:39, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > > Here is the problem. The current implementation of Mail is designed to
> > > be cross platform, i.e. work on GAE. It has the same API as GAE.
> > > Unless we figure out how to send MIME email messages on GAE, if you
> > > want to send MIME you should not use Mail native SMTP.
>
> > > On Jul 10, 4:31 pm, kralin <andrea.pierle...@gmail.com> wrote:
>
> > > > I've also tried to use MIME to encode both the html, and an
> > > > alternative text/html message, however all the encoding goes after
> > > > the double newline
> > > > and is not interpreted as an header.
>
> > > > so  Yarko are you saying that by doing  send(message='hello message')
> > > > instead of send(to=['....@me.com'], message='hello message')
> > > > it should worrk by including the correct headers in the message?
>
> > > > On 10 Lug, 22:15, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > > > > While this can be and something like this can be added it is my
> > > > > understanding that you do not need to change the header to send html
> > > > > emails. You need to use the MIME encoding and that should be
> > > > > transparent to what mail.send does now. If I am wrong please provide
> > > > > an example of how to change the headers to send a MIME encoded
> > > > > message.
>
> > > > > On Jul 10, 1:31 pm, kralin <andrea.pierle...@gmail.com> wrote:
>
> > > > > > I spent the whole afternoon trying to send an HTML formatted email
> > > > > > with web2py.
> > > > > > while I cannote use smtplib directly, cause it seems not to work, 
> > > > > > and
> > > > > > I think this should be "normal" in the framework.
> > > > > > however in the current release (Version 1.65.0 (2009-07-01 
> > > > > > 12:16:25))
> > > > > > it is not possible to alter the content-type, or any other header 
> > > > > > for
> > > > > > the email using the gluon.tools.Mail class.
> > > > > > this happens because anu message that is passed to the mail=Mail()
> > > > > > object is attached to this string before beeing sent:
>
> > > > > > msg = '''From: %s\r
> > > > > > To: %s\r
> > > > > > Subject: %s\r
> > > > > > \r
> > > > > > %s'''\
>
> > > > > > and the double newlines close the headers.
>
> > > > > > so it would be very useful to also set at least something link this:
>
> > > > > >     def send(
> > > > > >         self,
> > > > > >         to,
> > > > > >         subject='None',
> > > > > >         message='None',
> > > > > >         headers='\r\n'
> > > > > >         ):
>
> > > > > >                 msg = '''From: %s\r
> > > > > > To: %s\r
> > > > > > Subject: %s\r
> > > > > > \r
> > > > > > %s'''\
> > > > > >                      % (self.settings.sender, ', '.join(to),
> > > > > > subject,headers,
> > > > > >                         message)
>
> > > > > > so that it will be possible to pass directly some header strings or
> > > > > > pass an empty string as headers, and put them in the message.
> > > > > > this way they can be correctly recognized.
>
> > > > > > hope this helps
> > > > > > cheers
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to