Yes. I thought that gmail requires ssl so I am surprised that some
have been able to get it to work using Port 587. My code includes
                Properties props = new Properties();
                props.setProperty("mail.transport.protocol", "smtp");
                props.setProperty("mail.host", mailhost);
                props.put("mail.smtp.auth", "true");
                props.put("mail.smtp.ssl", "true");
                props.put("mail.smtp.port", "465");
                props.put("mail.smtp.socketFactory.port", "465");
                props.put("mail.smtp.socketFactory.class",
                                "javax.net.ssl.SSLSocketFactory");
                props.put("mail.smtp.socketFactory.fallback", "false");
                props.setProperty("mail.smtp.quitwait", "false");
                props.put("mail.smtp.starttls.enable", "true");
so ssl should be running.


On Jun 24, 4:23 pm, Kostya Vasilyev <[email protected]> wrote:
> Jack,
>
> There is a difference between these ports:
>
> Port 465 is for SMTP over SSL,.
>
> Port 587 is SMTP over "regular" (unencrypted) sockets, basically same as
> the old port 25 except hopefully not blocked by ISPs quite as often.
>
> I would assume using port 465 requires special code in the client (maybe
> setting some connection options since you are using a library).
>
> -- Kostya
>
> 24.06.2010 23:55, jack.n пишет:
>
> > So now I get
> > "could not connect to smtp host smtp.gmail.com port 465" but I doubt
> > this is an Android problem. I also don't think it is a firewall,
> > proxy, or virus scan issue since it is happening on both the desktop
> > development environment and the target (nexusone). I have also tried
> > port 587 which has worked for some when 465 didn't. Oh well, it could
> > be worse.
>
> --
> Kostya Vasilev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" 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/android-developers?hl=en

Reply via email to