通过j2me应用程序发送电子邮件 [英] send email through j2me application

查看:80
本文介绍了通过j2me应用程序发送电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用j2me lwuit构建应用程序. 我需要从该应用发送电子邮件.

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

推荐答案

为使您的应用程序更小,我建议在SocketConnection上实现SMPT.对于小型电子邮件,这将非常简单:

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

使用这种方法可以使您的应用程序仅依赖于MIDP/CLDC配置文件,从而可以更轻松地移植到其他电话中(至少在理论上如此).

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

这篇关于通过j2me应用程序发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆