如何用我们自己的API来发送电子邮件? [英] How to send an Email using our own own API?

查看:156
本文介绍了如何用我们自己的API来发送电子邮件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用这code发送邮件。

I am using this code to send a mail.

final Intent mail_Intent=new Intent(Intent.ACTION_SEND);
mail_Intent.setType("plain/text");
mail_Intent.putExtra(Intent.EXTRA_EMAIL,new String[]{toText.getText().toString()});             mail_Intent.putExtra(Intent.EXTRA_SUBJECT,subjectText.getText().toString());                mail_Intent.putExtra(Intent.EXTRA_TEXT,bodyText.getText().toString());              
Intent i=Intent.createChooser(mail_Intent, "Send Mail");
startActivity(i);

但是,下面的屏幕上,我得到了默认的Andr​​oid API.I不想让屏幕弹出。是否有任何其他的方式,我可以静静地发送邮件。

But on the following screen i get the default android API.I do not want that screen to popup. Is there any other way where i can silently send the mail.

任何帮助是AP preciated。在此先感谢..

Any help is appreciated. Thanks in advance..

推荐答案

如果你有机会获得一台服务器,以建立在它和PHP邮件服务器。这里有一个办法:结果
任何你喜欢的布局,使用户输入他的名字,他的邮件设计,收件人,主题和邮件体(以及任何其他信息,您可能希望他放弃)。然后,你抢了这一切,并把它放在一个HTTP请求中添加发布这些参数,然后发送到PHP页面,将处理发送电子邮件。然而,这是一个低安全性的方法,而不是在我的观点很安全...所以一定要保持警惕...

If you have access to a server, with a mail server set up on it AND php. Here is a way :
Design whatever layout you like to make the user enter his name, his mail, the recipient, the subject and the mail body (and any other information you might want him to give). Then you grab all this, and put it in a http request adding these parameters in POST and send then to a php page that will deal with sending the email. However, this is a low security method and not really safe in my point of view... So be on your guard...

这篇关于如何用我们自己的API来发送电子邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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