Wednesday, March 2, 2011

Re: [android-developers] Re: is javamail-android API work with other smtp server...

02.03.2011 9:14, kamiomar пишет:
> kindly elaborate the following statement:
>
> "For maximum compatibility, you need to set both SSL and non-SSL
> socket
> factories and port numbers and ensure that there is fallback from one
> to
> the other. SMTP over SSL is port 465, SMTP over plain sockets is port
> 25
> (which is often blocked) or 587 (often not blocked)."

That is - if you need to support different mail servers, not just one.

One mail server may accept mail on port 587 with no encryption, another
use port 465 with SSL, etc. The example on jondev.net is hard-coded for
port 465 with SSL, which is why you're getting an SSL socket exception
when trying to talk to a server that doesn't use SSL.

If on the other hand you only need to support one server, then just use
the correct values for that one server.

> what are the ssl and non-ssl socket factories and port number?
> thanks.

I listed them above, you can also find them in SMTP RFCs, Wikipedia, or
many other places.

JavaMail has its own site and mailing lists (I posted them in my
previous message), please use those if you have further JavaMail questions.

--
Kostya Vasilyev -- 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment