My question is how to call mail server method through Java? This method is called with JavaScript on the server.
The problem is that the Java Mail API cannot delete message from the server. I use message.setFlag(Flags.Flag.DELETE,true); but it doesn't work.
I don't understand exactly what you want to do, but there is a java mail library available see here:
http://www.oracle.com/technetwork/java/javamail/index.html
Related
I understand that I can send an email through Outlook using javascript and with mailto tag also. mailto tag will also open the default mailing client which will install on PC (did not to use it that all), however in my current situation I did not want to use it.
I want to create a webservice in Java or .Net. I can call the same web service with javascript or ajax that can dispatch an e-mail via SMTP.
Please let me know how to create a web service. Any idea will be helpful.
Thanks.
Useful link
Because your are using an applet already it would be easier just to do the e-mail method in java and call via JavaScript (this may throw unsigned applet warning at start).
Create a method in java that will send the message via smtp
Helpful links:
http://docs.oracle.com/javase/tutorial/deployment/applet/invokingAppletMethodsFromJavaScript.html
Sending Email via gmail smtp server in JAVA
How can I extract extract emails and attachments using an API from a SMTP (Mail) server?
I was trying to figure out how Posterous worked. I found this open source project but it had no source code.
https://code.google.com/p/os-posterous/
The scope of your question is a little too broad, but yes, there are many APIs available for extracting email content and attachments. It is actually pretty simple to do in most programming languages (though javascript has nothing to do with this). You could look at MailGun, AWS Simple Mail just to name a couple or you could roll your own. You don't need to create an SMTP server for this, just access an email address programmatically, scan the contents of new messages and perform some logic on the content/attachments/etc.
Python: http://docs.python.org/2/library/imaplib.html
PHP: http://us2.php.net/imap
Ruby: http://www.ruby-doc.org/stdlib-2.0.0/libdoc/net/imap/rdoc/Net/IMAP.html
Java: https://javamail.java.net/nonav/docs/api/com/sun/mail/imap/IMAPStore.html
For Posterous I wrote a service in Java which connected to a mail server over IMAP and parsed incoming emails, attachments, etc. The JavaMail framework makes it super simple to do this.
We have a server written in java, and an application written in phonegap for the android with javascript.
How can we transfer and receive information from the application to the server?
We've tried using DWR to no avail, as the html file is on the android, so we can't call methods on the server.
Is there anyway around it so we can use DWR or another method to contact the server?
Thanks
We transfer and receive information by using AJAX calls and jQuery, and setting the server headers correctly (i.e., setting "Access-Control-Allow-Origin" to "*"). This allows any client to make cross-domain AJAX calls.
Is anyone aware of a way to retrieve and send mails by talking directly to the GroupWise server.
I want to be able to retrieve mail using Java if possible.
I wrote a Outlook Plug-In that retrieved mail out of GroupWise via the Groupwise Outloop Plug-in (If that makes sense).
Then dropped the message in a directory where I retrieved it with a Java App.
The problem is that I cannot add more than one GroupWise account in Outlook and need to.
I had a look at this question, but would like to know if there is a Java API
that will allow me to retrieve/send mail from the GroupWise server in a JavaMail like manner.
Thanks.
GroupWise allows mails to be retrieved using IMAP and POP3 which are standard supported by JavaMail. (And outlook too for that matter)
Sending mail should also be possible using smtp.
If it is for plain email I prefer to use these basic proptocols like smtp, pop3 and imap because they work almost everywhere, anytime and on any platform. They are less feature rich than the proprietary protocols, but that point is often not very relevant since many of these features are only meaningful for a subset of the mailclients out there.
I want to create a java program to connect to an outlook webmail server to check for unread emails. I am not looking for an open source java based email client etc.. etc..
I am basically asking if it is possible to create a Java interface to an Outlook Webmail Server. I have been trying to hunt down how I would even begin to do this and it isn't inherently clear. Thanks..
You can use WebDav interface before exchange 2007 or EWS (Exchange Web Services)in Exchange 2007+
EWS Reference - http://msdn.microsoft.com/en-us/library/bb204119.aspx
Also a blog that may start u off with webdav
http://blogs.msdn.com/dotnetinterop/archive/2008/07/21/connecting-java-to-exchange-over-webdav-with-apache-httpclient.aspx
You could also try to have a look at the free exchange clients. Maybe you'll find informations regarding the protocol there.
Apache is developing a API for it Apache POI using which u easily can connect to outlook....