is javamail-android API work with other smtp server...

by kamiomar » Thu, 24 Feb 2011 19:11:30 GMT


Sponsored Links
 i have download jar files from the following link:

 http://code.google.com/p/javamail-android/downloads/list 

and try the following example:

 http://www.jondev.net/articles/Sending_Emails_without_User_Intervention_ (no_Intents)_in_Android

but this is working only for gmail not for others.

I  tried with my own SMTP server but not working.

I think these API is for only gmail.
may I correct?

if yes then how we can connect with different smtp server and send
emails?

Thanks.

-- 



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

by Kostya Vasilyev » Thu, 24 Feb 2011 19:36:56 GMT


 What does "not working" mean?

The sample uses SSL over port 465, which is pretty standard, but if your own
server is configured differently (non-secure port 25, or 587, for example),
then you'll need to adjust your code accordingly.
24.02.2011 14:12  "kamiomar" <kamio...@gmail.com> :
 http://www.jondev.net/articles/Sending_Emails_without_User_Intervention_ (no_Intents)_in_Android

-- 


Sponsored Links


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

by kamiomar » Mon, 28 Feb 2011 21:12:34 GMT


 my smtp server port is 27. i changed the port and smtp server but
still the code not working throwing the following exception.

Caused by: java.io.IOException: SSL handshake failure: Failure in SSL
library, usually a protocol error







-- 



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

by Kostya Vasilyev » Mon, 28 Feb 2011 21:27:52 GMT


 Yes, this makes perfect sense. The code sample you referred to uses SSL 
connection with no fallback to non-SSL connection:


    props.put("mail.smtp.port", _port);
    props.put("mail.smtp.socketFactory.port", _sport);
    props.put("mail.smtp.socketFactory.class", 
"javax.net.ssl.SSLSocketFactory");

    props.put("mail.smtp.socketFactory.fallback", "false");

As a quick fix, change the factory class name from 
javax.net.ssl.SSLSocketFactory to javax.net.SocketFactory or change 
fallback to true.


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).


 http://kenai.com/projects/javamail 

 http://kenai.com/projects/javamail/lists 

-- Kostya

28.02.2011 16:12, kamiomar :
my smtp server port is 27. i changed the port and smtp server but still the code not working throwing the following exception. Caused by: java.io.IOException: SSL handshake failure: Failure in SSL library, usually a protocol error
What does "not working" mean? The sample uses SSL over port 465, which is pretty standard, but if your own server is configured differently (non-secure port 25, or 587, for example), then you'll need to adjust your code accordingly. 24.02.2011 14:12 "kamiomar"<kamio...@gmail.com> :> i have download jar files from the following link:
http://code.google.com/p/javamail-android/downloads/list and try the following example:
http://www.jondev.net/articles/Sending_Emails_without_User_Interventi...
but this is working only for gmail not for others. I tried with my own SMTP server but not working. I think these API's is for only gmail. may I correct? if yes then how we can connect with different smtp server and send emails? Thanks. --
-- Kostya Vasilyev -- http://kmansoft.wordpress.com --



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

by kamiomar » Wed, 02 Mar 2011 14:15:07 GMT


 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)."

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





-- 



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

by Kostya Vasilyev » Wed, 02 Mar 2011 16:24:52 GMT


 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 --



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

by kamiomar » Fri, 04 Mar 2011 13:35:53 GMT


 thanks kostya Vasilyev for helping me.
i resolved the problem. only one thing left jondev.net code not
working with hotmail. i think this issue also reported. checkout the
following link:
 http://code.google.com/p/javamail-android/issues/list 

if it is possible through hotmail please inform me.

Thanks once again.






-- 



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

by David Toledo » Fri, 04 Mar 2011 15:56:38 GMT


 Hi All

How could  the get the production key for The Google Maps API

Thanks
David

-- 



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

by Roc Boronat » Fri, 04 Mar 2011 21:00:25 GMT


 David, your message is an offtopic in this thread, but look at this slide:
 http://www.slideshare.net/rocboronat/hello-googlemaps Look for the 15th 
slide.

And use your own ".keystore" instead of the debug "debug.keystore".

Bests,
Roc Boronat
 http://rocboronat.net 


2011/3/4 David Toledo <dtole...@gmail.com>


-- 



Other Threads

1. Byte stream @ "/sys/class/lightsensor/switch_cmd/" getting deleted on Reboot.

I mark auto brightness checkbox option in one of my apk..... This
would send some byte stream to  "/sys/class/lightsensor/switch_cmd/
lightsensor_file_cmd"..... And auto brightness will be activated once
 this byte stream is delivered....

 However, the auto brightness capability should be ON even if I
reboot..... BUt since data in the file is getting deleted, auto
brightness feature is failing...... How can i overcome this????

Xie xie.

--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. Intent filters: how do I know which action to use?

> You can find more about Intents and how to use them at

Thanks for the resources!

Since my original post I did figure out how to do what I want. On my
intent-filter element in AndroidManifest.xml, I needed these elements:

  action name="android.intent.action.CHOOSER"
  action name="android.intent.action.SEND"
  category name="android.intent.category.ALTERNATIVE"
  category name="android.intent.category.SELECTED_ALTERNATIVE"
  category name="android.intent.category.DEFAULT"
  data mimeType="image/*"

While it's useful to know about the individual action and category
types, it took what I think was far too much googling and trial and
error to figure out that the above was necessary to do what I needed.
Which is to say, I nearly had to hunt down the Gallery source code and
look at the Intent object it was creating.  Is this just the accepted
procedure in this case?  Or is there a better way to discern exactly
what it's going to take to match something Android is doing to the
intent-filter on my activity?

Thanks,

-- 
  Jonathan Daugherty

--~--~---------~--~----~------------~-------~--~----~

3. Class resolved by unexpected DEX

4. Is there any way to use Luke's multitouch application in the Emulator?

5. How to add Google Maps library, Maps to the Android 1.5 version device?

6. Keeping an application running in the background

7. Web development strategies for small screens... Sorry, not Android specific