Here is what the GAE documentation says:
Using Mail
The development web server can send email for calls to the App Engine
mail service. To enable email support, the web server must be given
options that specify a mail server to use. The web server can use an
SMTP server, or it can use a local installation of Sendmail.
To enable mail support with an SMTP server, use the --smtp_host, --
smtp_port, --smtp_user and --smtp_password options with the
appropriate values.
dev_appserver.py --smtp_host=smtp.example.com --smtp_port=25 \
--smtp_user=ajohnson --smtp_password=k1tt3ns myapp
To enable mail support with Sendmail, use the --enable_sendmail
option. The web server will use the sendmail command to send email
messages, with your installation's default configuration.
dev_appserver.py --enable_sendmail myapp
If mail is not enabled with either SMTP or Sendmail, then attempts to
send email from the application will do nothing, and appear successful
in the application.
http://code.google.com/appengine/docs/python/tools/devserver.html#Using_Mail
Thanks,
-- Mohamed D.
On Dec 12, 10:51 pm, GregD <greg.du...@gmail.com> wrote:
> Any help please. I'm trying to send email from my servlet. I
> basically copied the code from the gae site. Im setting the from
> address as the admin of the gae account (fyi also tried a normal gmail
> account). In the admin console its saying the mails were sent, but Im
> not seeing the email on the receiving end. Also there are no
> exceptions being logged. my code is below.
>
> Properties props = new Properties();
> Session session = Session.getDefaultInstance(props, null);
>
> StringBuffer sb = new StringBuffer();
> sb.append("Name: " + name);
> sb.append("Email: " + email);
> sb.append("Phone: " + phone);
> sb.append("Message: " + message);
>
> try {
> Message msg = new MimeMessage(session);
> msg.setFrom(new InternetAddress
> ("ad...@mygaeaccount.com"));
> msg.setRecipient(Message.RecipientType.TO, new
> InternetAddress("g...@mygaeaccount.com"));