send email through j2me application

老子叫甜甜 提交于 2019-12-04 07:05:18

问题


I am having an application build using j2me lwuit. I need to send e-mail from that app.


回答1:


To make your application smaller, I'd suggest to implement SMPT over a SocketConnection. For small e-mails this shall be pretty straightforward:

SocketConnection connection = (SocketConnection)Connector.open("socket://your.smtp.server:25");
DataInputStream is  = sc.openDataInputStream();
DataOutputStream os = sc.openDataOutputStream();
//now the SMTP chat with server

Using this approach may allow you to make your application to be depend only on MIDP/CLDC profiles, thus to be easier portable to other phones (at least in theory).




回答2:


Hi find the link its working fine. You can send mail with attachment.

http://itminds-usefullinks.blogspot.com/2011/12/sending-mail-from-j2me-app-wihtout-web_01.html

its really helps You....



来源:https://stackoverflow.com/questions/4333090/send-email-through-j2me-application

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!