All-

PROBLEM:

Windows does not natively support "sendmail". So, it is cumbersome to 
obtain email messages generated locally by your GAE application.

SOLUTION #1:

One can use the "show_mail_body" option with the development server to log 
the entire message to the log. This is quick and easy, but can prove 
tedious when you've got to dig them out of the log and save them off 
separately.

SOLUTION #2:

Install a sendmail "stub" that writes all email messages to disk, one file 
per message.

STEPS:

(1) Create the following folders:

C:\Users\Josh\Programs\
C:\Users\Josh\Programs\sendmail\


where "Josh" is replaced appropriately.

(2) Go 
here<http://www.softpedia.com/progDownload/Sendmail-Stub-Download-214071.html> 
and 
download "Sendmail Stub 0.3.0.0"

(3) Save the downloaded file (sendmail.exe) in the folder created in (1).

(4) Modify your Windows user path, as follows:

(a) Right-click on "My Computer"
(b) Select "Properties"
(c) Click "Advanced system settings"
(d) Click "Environment Variables"
(e) In the "User variables" section at the top, click "PATH" and then 
"Edit..."
(f) In the "Variable value" box, append a ";" and then the *2nd* folder 
from (1). For example:

;C:\Users\Josh\Programs\sendmail\

(g) Click "OK", "OK", "OK"

(5) Verify that the sendmail stub is working, as follows:

(a) Launch a "cmd" window
(b) Type sendmail and press return
(c) Type this:

The quick*<return>*

brown fox*<return>*

*<Control-Z><return>*

​(d) You should see "Message is saved"
(e) ​Verify that the following folder was created: 
​​
C:\Users\Josh\Programs\sendmail\
​tmpmail\
(f) Verify that the tmpmail folder contains a ​file with a timestamped name 
(e.g. 
2014-01-17_08-15-29.eml
​)
(g) Open the file in a text editor​
​(h) Verify that it contains the message typed in (c)​


(5) Launch "Google App Engine Launcher"

(6) Configure your application to use sendmail, as follows:

(a) Select the application for which you want to enable sendmail support
(b) Choose "Edit/Application settings..."
(c) Add this to the "Extra Command Line Flags": --enable_sendmail=yes
(d) Click "Update"
(e) Start your application

(7) Verify that the GAE/sendmail integration is working, as follows:

(a) "Browse" to launch the application
(b) Perform some operation that will generate an email message
(d) Look for a new file in the 
​
C:\Users\Josh\Programs\sendmail\
​tmpmail\ folder

-Josh

==============================================
Joshua Golub ([email protected])
Finite Wisdom (http://www.finitewisdom.com/)

877.550.7400 (voice)
866.550.7400 (fax)

We know technology. We don't know Facebook.
============================================== 

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to