I want to send mail through the help of SMTP server. currently I am using CreateEmailDailog but in this, when press Send button then mail is sent.
I want to with any press my mail is send in background. I want to use set recipient, subject and message body default.
any suggestion is appreciated.
There is no ready-made SMTP support in Titanium SDK. You need to implement yourself with using TCPSocket operations.
Check http://docs.appcelerator.com/titanium/2.0/index.html#!/api/Titanium.Network.Socket.TCP for documentation and example code.
SMTP protocol is easy. There are few commands like; EHLO, MAIL FROM, RCPT TO, AUTH LOGIN, DATA, QUIT. You can find all protocol specification on RFC documentations.
Related
I'm working with one live chatting application via XMPP, Used aSmack as client and configured ejabberd for server end. I'm Implement one to one chat and it's working fantastic. Now I'm trying to integrate Broadcast message to Multiple user.
I'm learn XEP-0033 protocol because I know this protocol is responsible for message broadcasting and also getting full theoretically clarity on same Basically my question is
I'm not getting any proper reference for integrate this protocol in my code.
Is aSmack is provide a predefined stanza for this protocol or May I need to make custom stanza to integrating this protocol. If yes than please suggest any reference link for same.
I'm also check MultiUserChatLightManager but this class is for Group chat but I need to first integrate Message broadcasting.
Is any change is required at ejabberd server side for implementing this protocol?
I'm not too much expert on XMPP.
i had the similar problem and was solved using this
upload a broadcast plugin to your openfire server.link is here
and the read me link for the plugin here
for broadcasting the message follow the pattern to set To Id
all#[serviceName].[serverName]
where serviceName is broadcast and serverName is our server name
send your xmpp message from your android client like this
Message msg = new Message();
msg.setBody(yourmessage);
msg.setFrom(yourJid);
msg.setTo("all#broadcast.yourservername");
yourXmppConnection.sendStanza(msg)
for other alternative and high customization in broadcasting message you can go for XEP-0060: Publish-Subscribe here
and here is the smack e.g
I am adding OTP in Android app . With one edit text user will enter his mobile no will get otp with sms gateway provider .
Please tell me for above condition what will be best method to send otp and verify otp ? Why ?
GET or POST method ?
To verify OTP you should use POST as in GET the parameters are visible, also to make it secure you can use https connection for verify OTP service (provided your webservice supports it) . For further security you can encrypt your OTP at client side and decrypt it at server side before verification.
I want to send emails with javamail-android but I'am using a host server different than usual ones (Gmail, Yahoo, Hotmail, etc). The host is accessed via APN throught the mobile data network, I don't know how configure this. Currently my code for sending email setup all fields like this:
mailer.setFrom("myself#xxxxx.com");
mailer.setUser("myself#xxxxx.com");
mailer.setPassword("xxxxxxxxxx");
mailer.setHost("smtp.xxxxx.xx");
mailer.setPort(25);
mailer.setSocketFactoryPort(25); // ?
I'm getting the next error Unknown SMTP host: smtp.xxxxx.xx. I know for sure that at least the above data is OK. But I don't know how to use the previous configuration on APN and "mobile-data". Is there something wrong with this configuration ? Do I have to change something to make it work with APN and mobile data network?
My code for sending email is almost the same described here.
I have seen many times the ease of sending an email in the foreground using the Android Intent Action.SEND.
However I need to implement a feedback form which emails us the details on completion. This doesnt really suit the Android Intent because the user wouldnt want to see the generated email before sending.
Does anyone have any sample code which can send an email form the background if we assume the smtp server is lol.does.thiswork and the username = lala, password = po.
Cheers
Possible duplicate of this: Sending Email in Android using JavaMail API without using the default/built-in app and plenty of example code in there.
as an editorial note, anytime an application I am using on a phone sends an email, I personally WOULD want it in the foreground. If its just feedback from a form on your application, you could also use several solutions other than email: a web form in a webview, or create a socket back to a server you host, or a use a webservice etc...
I would like to know how to make an android app send a mail with a static text when i click a button for example.
Thanks
You can bounce the message off a web script and have php do the sending for you. It's a hybrid approach android/php, but it allows you to have a little more flexibility and would offload any strains on email sending to the server and not android.