as FROM use e-mail you are using to login to your GAE account
On Nov 4, 2009, at 16:37 , rasensio wrote:
>
> 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("s...@myappstop-domain"));
> msg.addRecipient(Message.RecipientType.TO, new
> InternetAddress
> ("[email protected]"));
> 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 ???
>
> >
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---