Hi,

I'm trying to send emails from Google App Engine Standard in Java by 
directly connecting to *an external SMTP server*.
I'm failing doing so.

I can successfully send emails via* GAE smtp replay* - this is how I 
accomplish so:
Properties props = new Properties();
props.put("mail.transport.protocol", "smtp");
Session mailsession = Session.getDefaultInstance(props, null);
Message msg = new MimeMessage(mailsession);
[SNIPPET - setting msg parameters]
Transport.send(msg);

In order to send email using an *external SMTP server*, I've tried to edit 
the code above adding the following rows:
            props.put("mail.transport.protocol", "smtp");
            props.put("mail.smtp.host", SRV_IP);  // i.e., 
SRV_IP="123.123.123.123"
            props.put("mail.smtp.auth", false);
            props.put("mail.smtp.port", SRV_PORT);  // i.e, SRV_PORT=9087
 
but looks like such parameters are simply ignored - and the email gets sent 
using the GAE internal SMTP relay. (edited)

Does anyone know how to accomplish such goal?
Thank you in advance!

-- 
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 https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/14056991-5640-4a3a-ae50-332eaf985ee8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • [google-appengine]... Antonio Bucciol

Reply via email to