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. Nexian Journey Users, here comes a new version of Apanda

Apakah ini Journey 2 ya? 
Lagi development kan denger2 di Nexian?

CMIIW. 

B/Rgds, 
Bambang S. Pranoto (Yongky)
@Bambang_Yongky ; GTalk bambang.yongky

-----Original Message-----
From: "Marwana, I.B.Pt .: biMp :." <bimp.marw...@gmail.com>
Sender: id-android@googlegroups.com
Date: Thu, 24 Feb 2011 09:59:07 
To: <id-android@googlegroups.com>
Reply-To: id-android@googlegroups.com
Subject: [id-android] Nexian Journey Users, here comes a new version of Apanda

Nexian Journey A890 kan satu species sama Apanda A60, nah sekarang 
Apanda ngeluarin gadget baru yang semoga saja diadopsi lagi sama merk 
"lokal".

Produsen ponsel China Apanda merilis produk ponsel pintar Apanda A100 
yang menggunakan sistem operasi Android Gingerbread. Ini berarti bahwa 
OS pada ponsel ini sama dengan Google Nexus S yang dibuat oleh Samsung.

Pada awalnya prototype dari perangkat ini memang hanya menggunakan 
Android 2.2 Froyo namun pada saat mulai dipasarkan nanti perangkat ini 
akan menggunakan Android 2.3 Gingerbread.

Dari informasi yang kami peroleh, perangkat ini diotaki dengan prosesor 
Snapdragon QSD8650 1GHz, ROM 2GB, RAM 512MB, Layar kapasitif berukuran 
4.3 inch dengan resolusi 480 x 800 piksel serta baterai dengan kapasitas 
1400 mAh. Tidak lupa juga kamera 5 megapiksel yang mampu merekam video 
HD 720p dan port 3.5 mm untuk jack audio.

-- 
Regards,


-biMp-

-- 
===============


-- 
===============

2. Android 3.0 SDK Beredar

Android 3.0 SDK Beredar 
GOPEGO.COM | FEBRUARY 23, 2011
http://pulsene.ws/12BpA 


Berita gembira buat para developer: Android 3.0 SDK telah beredar. Waktu untuk 
belajar dan berkembang bersama Honeycomb.

--
Shared via Pulse, an awesome news reader for iPad, iPhone and Android. Check it 
out! 


www.gopego.com
Sent from my iPhone

-- 
===============

3. Motorola Atrix 4G Promosi di 30 Video YouTube

4. Call Blocker & SMS Blocker untuk Android

5. 绛斿: Android HAL code debug

6. Protecting copyright of my android application

7. New Android Device