java mail unauthorized user

7 views
Skip to first unread message

rasensio

unread,
Nov 4, 2009, 4:37:52 PM11/4/09
to Google App Engine
I'm trying to send an email from a servlet and got this exception.

avax.servlet.ServletContext log: javax.mail.SendFailedException: Send
failure (javax.mail.MessagingException: Illegal Arguments
(java.lang.IllegalArgumentException: Unauthorized Sender: Unauthorized
sender))

my code

Properties props = new Properties();

Session session = Session.getDefaultInstance(props, null);

String msgBody = e.getMessage() == null ? e.toString() : e.getMessage
();

try {
Message msg = new MimeMessage(session);
msg.setFrom(new InternetAddress("some@myappstop-domain"));
msg.addRecipient(Message.RecipientType.TO, new InternetAddress
("so...@recipient.com"));
msg.setSubject("some subject");
msg.setText(msgBody);
Transport.send(msg);
this.getServletContext().log("Email sent...");
} catch (Exception ex) {
this.getServletContext().log(ex.toString());
}

Any clue what should be an authorized user ???

Tchijov Andrei

unread,
Nov 4, 2009, 6:34:24 PM11/4/09
to google-a...@googlegroups.com
as FROM use e-mail you are using to login to your GAE account
Reply all
Reply to author
Forward
0 new messages