Thank you Waldemar!!! This also worked for me!!!
(Just to mention for others, you need to setup you gmail account to allow 
use of less secure apps in order to use this way of sending emails)

On Tuesday, June 17, 2008 at 9:50:54 PM UTC+1, Waldemar Kornewald wrote:
>
> Hi, 
>
> On 17 Jun., 11:38, "David Symonds" <dsymo...@gmail.com> wrote: 
> > On Tue, Jun 17, 2008 at 7:31 PM, songokoussj2 <songokous...@gmail.com> 
> wrote: 
> > > The point is that gmail does not work for sending mails so there might 
> > > be a bug and i want to find out this bug or my mistake. 
> > 
> > It sounds like just a missing feature, not so much a "bug". You can 
> > always just file a bug ticket about it, though. 
>
> OK, I have the same problem and it's very strange. 
>
> The problem is this: 
>
> If you run 
> dev_appserver.py --smtp_host=smtp.yourisp.com ... . 
> it works. 
>
> But if you run 
> dev_appserver.py --smtp_host=smtp.gmail.com ... --smtp_port=587 . 
> it doesn't work. 
>
> Neither port 25 nor 587 work. The exception "SMTP AUTH extension not 
> supported by server" is raised. I've found out what the problem is: 
> dev_appserver.py doesn't support TLS, but GMail requires it. After I 
> inserted a little code snippet into api/mail_stub.py it can 
> successfully send mail via the GMail SMTP server: 
> After       smtp.connect(self._smtp_host, self._smtp_port) I inserted: 
>       smtp.ehlo() 
>       smtp.starttls() 
>       smtp.ehlo() 
> of course, it should actually check whether TLS should be used. :) 
>
> But there is another bug: dev_appserver.py is using the email API 
> incorrectly. In line 153 it says: 
>       smtp.sendmail(mime_message['From'], tos, str(mime_message)) 
> but it should be mime_message.as_string() because str(mime_message) 
> returns a format that looks more like mbox (beginning with the string 
> "From nobody Tue Jun ...") and thus isn't a valid email message. Some 
> servers still accepted it, but we always received a broken mail. Other 
> servers immediately rejected the mail. With the change to 
> mime_message.as_string() everything finally works as expected. 
>
> Bye, 
> Waldemar 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/a96cd89f-8b58-4edb-b638-68ff1c660189%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to