On Nov 2, 11:19 pm, Prakash <[EMAIL PROTECTED]> wrote: > I tried to make use of the Mail API as provided in the gallery page. I > am using the web application as provided > inhttp://www.42topics.com/dumps/appengine-search/doc.html > > I am trying to mail this content to a mail id. It is giving me issues > while doing so: > > results = get_search_results('Hello', query) > results = results['Result'] > payload = dict(results=results, query=query) > resp = template.render('index.html', payload) > message = mail.EmailMessage (sender="[EMAIL PROTECTED]", > subject = "You searched for string " + query) > msg = MIMEText(resp) > message.to = mail > message.body = msg.as_string() > message.send()
This ought to work as long as message.to and sender are correct. Are you running this example from the command line dev_appserver.py? If so, you need to specify the MX server command line arguments. Here is how I run that in my test environment: dev_appserver.py --smtp_host=192.168.0.240 --smtp_port=25 -- show_mail_body myapp If this isn't working on the actual app uploaded to appspot.com then the problem may be different. Cheers, pr3d4t0r http://www.istheserverup.net http://www.teslatestament.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---
