google-app-engine


AppEngine vs. sendmail space problem


I am using sendmail to be able to send mails from AppEngine while it is running locally (i.e. dev_appserver.py). Here is my code:
mail.send_mail(
sender="SenderName <sender#domain.name",
to= "ReceiverName <receiver#domain.name>",
subject=subject,
body=text,
html=html)
When I execute this code, with proper emails and other parameters, I get this error:
/bin/sh: Syntax error: end of file unexpected
ERROR 2010-12-23 19:31:16,459 mail_stub.py:177] Error sending mail using sendmail: [Errno 32] Broken pipe
After some investigation it turned out that the error (i.e. broken pipe) is caused because of the syntax of the 'sender' and 'to' emails. If I only keep the email (rather than the name also), the problem is solved. This tells me that AppEngine is dumping the parameters to sendmail without suitable quotes. So something like:
sendmail .... SenderName <sender#domain.name> ReceiverName <receiver#domain.com>
Obviously, this will cause parameter conflicts because the shell can't know that is part of the sender email, and this is causing the problem.
Any idea how to solve this problem? I want to keep the names in the emails.
By the way, this works fine when I upload my code to AppEngine, but I want to solve it locally too to avoid having to change the code every time I am testing.
There's an issue for this in the App Engine issue tracker, which includes a patch to add quotes around the addresses, at http://code.google.com/p/googleappengine/issues/detail?id=3106

Related Links

Google Cloud Storage Force Download
Importing data into 2nd generation google cloud sql
App Engine: What is the Maximum URLFetch Timeout Deadline in a Taskqueue / Backend
Using URL-safe keys in Google Cloud Datastore
AttributeError on google cloud datastore entity object
Is there any way to handle Google Datastore Kind Property names with spaces in Golang?
Google App Engine: Disable favicon.ico
Google Cloud DataStore. How to serve data?
How to access a cloud storage bucket from app engine without getting the 403 FORBIDDEN error?
Google App Engine Custom Domain - Routing in Go
Best approach for caching lists of objects in memcache
com.google.gcloud.datastore vs com.google.appengine.api.datastore
Google App Engine - Issue with creating a bulkloading config
Solr Timeout error even data is instered
Why does BigQuery fail to parse an Avro file that is accepted by avro-tools?
Insufficient Permission with Appengine Flex service account to access Drive folder

Categories

HOME
cygwin
twitter-bootstrap-3
webdriver
pagination
android-studio-2.2
jax-rs
jmx
emscripten
mapbox
jquery-ui
jax-ws
syntaxnet
owin
x-cart
eip
microsoft-dynamics-nav
standards
html5-appcache
git-extensions
smartclient
mapstruct
charles
libigl
inno-download-plugin
ckfinder
windows-server-2003
stackexchange
shared
genexus-sd
handler
ceylon
browser-sync
jaws
zend-debugger
mustache
git-squash
android-sugarorm
github3.py
installscript
arduino-ide
openproject
amazon-ses
azure-arm
plaintext
levenshtein-distance
branching-and-merging
glm-math
ssrs-2014
ovf
xbmc
gitlist
dbcontext
rserve
java-bytecode-asm
avx
dt
er-diagram
mach-o
shinobi
swingworker
node-request
stax
flex-monkey
webjars
resourcemanager
x-tag
cifilter
dimension
appscale
query-by-example
phpwebsocket
nio2
aspen
computer-architecture
ons-api
video-player
eoferror
rdflib
nsurlsessiondatatask
bcache
procedural-programming
deform
authlogic
multiautocompletetextview
bin
gtm-oauth2
c++builder-xe5
scringo
superscrollorama
argouml
pdfviewer
tree-balancing
fragmenttransaction
xcode3.2
veracity
inkcanvas
window-decoration
azman
expression-blend-4
tournament
clrstoredprocedure
msr
twitterizer
collectionviewsource
cruisecontrol.rb
object-database
ajax-polling
mathematical-notation
commercial-application

Resources

Encrypt Message