编程方式发送电子邮件,而不需要使用黑莓设备配置的电子邮件ID? [英] send email programmatically without using EMAIL ID configured in Blackberry device?

查看:152
本文介绍了编程方式发送电子邮件,而不需要使用黑莓设备配置的电子邮件ID?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发一个社交应用程序中,我需要的发送电子邮件为其他用户的要求作为一个应用程序邀请。然而,我的要求是,我不希望使用在设备中配置的电子邮件ID。

I am developing a Social Application in which I need to send email as a request to other users as an Application Invitation. However, my requirement is that I don't want to use the E-mail ID configured in the device.

我想从我的公司的支持ID 发送电子邮件。我不想使用用户的电子邮件ID。

I want to send the Email from the support ID of my firm. I do not want to use the USER'S Email ID.

这可能吗?

推荐答案

我认为这取决于你想要做什么。一个简单的方法来发送电子邮件的黑莓应用程序是为<一个href=\"http://docs.blackberry.com/en/developers/deliverables/11935/Create_new_populated_email_msg_565427_11.jsp\"相对=nofollow>做这样的事情:

I think it depends on what you want to do. An easy way to send emails in a BlackBerry app is to do something like this:

Message m = new Message();
Address a = new Address("mLi@rim.com", "Ming Li");
Address[] addresses = {a};
m.addRecipients(net.rim.blackberry.api.mail.Message.RecipientType.TO, addresses);
m.setContent("A message for you...");
m.setSubject("Email for you");
Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, new MessageArguments(m));

如果这就是你想要做什么,然后你就会看到<一个href=\"http://www.blackberry.com/developers/docs/5.0.0api/net/rim/blackberry/api/invoke/MessageArguments.html\"相对从API文档=nofollow的> 没有发件人 MessageArguments可用字段类。因此,调用的电子邮件应用程序将使用该设备的配置的电子邮件帐户,理查德建议

If that's what you want to do, then you'll see from the API docs that there is no FROM field available in the MessageArguments class. So, invoking the email application will use the device's configured email account, as Richard suggested.

但是,除非我不知道一些关于黑莓的网络基础设施(如他们有过滤功能,将停止这一点),我不明白为什么你不能写自己的小电子邮件客户端,连接到目的地服务器,并与你喜欢的电子邮件标题发送邮件。一个简单的J2ME SMTP客户端看起来<一个href=\"http://itminds-usefullinks.blogspot.com/2011/12/sending-mail-from-j2me-app-wihtout-web_01.html\"相对=nofollow>这样的样本code 。 (注意:我没有试过,code,但乍一看,它看起来像正确的做法)。当然,它肯定更code比我上面张贴的代码片段!

But, unless I don't know something about the BlackBerry network infrastructure (like they have filtering that would stop this), I don't see why you couldn't write your own small email client, to connect to the destination server, and send the message with whatever email headers you like. A simple J2ME SMTP client might look like this sample code. (Note: I haven't tried that code, but at first glance, it looks like the right approach). Of course, it's certainly more code than the snippet I posted above!

一个多与我们现有的电子邮件基础设施的大问题是,发件人的地址不是的验证的。所以,你可以说,<一个href=\"http://www.arclab.com/products/amlc/how-to-read-and-analyze-the-email-header-fields-spf-dkim.html\"相对=nofollow>电子邮件是您想要谁。这是原因之一,垃圾邮件和钓鱼是这样的大问题。谁想要可以给你,自称是从您的银行或其他人他们不是电子邮件。

One of the big problems with much of our existing email infrastructure is that the sender's address isn't authenticated. So you can say that the email is from whoever you want. This is one reason why spam and phishing are such big problems. Anyone who wants to can send you an email that claims to be from your bank, or someone else that they're not.

现在,我不写垃圾邮件过滤器,每一个目标邮件服务器可以使用不同的算法。这可能是因为你的用户会发现他们的垃圾邮件过滤器捕获您的电子邮件,这取决于发件人地址使用,以及如何将消息路由到他们的SMTP服务器(您使用的黑莓运输)。

Now, I don't write spam filters, and every destination mail server can be using a different algorithm. It's possible that your users will find their spam filters trapping your emails, depending on what FROM address you use, and how you route the message to their SMTP server (which BlackBerry transport you use).

所以,这可能不适合你的以及的。反正,我只是想表明它是如何的可能的将在J2ME应用程序做......你可能需要张贴在一个真正的IT论坛,这个问题的一部分,看有什么人不得不说的垃圾邮件过滤器的问题。

So, this might not work well for you. Anyway, I just wanted to show how it could be done in a J2ME app ... you may need to post part of this question on a true IT forum, and see what people have to say about the spam filter issue.

这里的话题讨论

这篇关于编程方式发送电子邮件,而不需要使用黑莓设备配置的电子邮件ID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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