I want to be able to send/receive mail from my Java Server application. Is there a standard tool chain to use? [The main thing is that I am writing an enterprise web app in Java, and I need a way to (1) send emails that contain authorization codes and (2) receive complaints.]
Thanks!
EDIT: I apologize. This is entirely my fault. I was not clear in the spec.
When I say send/receive emails, I meant: I need my application to be able to run it's own mail server. I don't have an external imap/pop3 account I'm using. My application need to provide the mail server.
The Apache James project might be a good starting point. It is a full-featured SMTP server written in Java. I am certain it is possible to interface other Java applications with James and/or write James extensions.
what you're looking for it's java mail and it's compatible with EE here's the link
Sending and receiving EMails you can do with the help of Java EE standard JavaMail API. If your application is spring enabled, you can use org.springframework.mail package which has some good abstraction utilities. Apart from this you need to have MTA(Mail Trasport Agent) like James as mentioned above.
Definitely a good alternative is Java E-mail Server (JES) at http://javaemailserver.sourceforge.net/. It's a full blown server for sending and receiving mail. "JES is a multi-featured hybrid MTA/MDA server written in the java programming language."
Related
I am new to spring.I had a doubt regarding sending mails.How can i send a bulk of mails from spring based web application in which i have a requirement in my project.
I have no idea on this please suggest me something which is helpful
Thanks in advance
you can send bulkemails using spring and it also offers scheduling a mails to multiple reciepts refer this example
refererence
You can also go through some of the real sites which are already exists and using for marketing with bulkmails check this
so that you can get an idea to work on your requirements
I usually offer some code but in this case I would just copy-paste from this tutorial.
Spring has very little in terms of mailing support (which is found in the context-support module), which itself is just a wrapper over the javax.mail package.
I would use a service like Amazon SES, which helps keep your email messages out of spam boxes.
Install an MTA (like Postfix) in Satellite Mode on your local machine. This will relay emails to Amazon SES.
Use JavaMail to send email messages to localhost, and they will go to your MTA queue, and get sent to Amazon.
Make sure you are complying with anti-spam legislation: http://www.business.ftc.gov/documents/bus61-can-spam-act-compliance-guide-business
I have looked up Google and Spring documentation but can not find any thing on receiving emails.
I need to build a client (kind of not fully blown client) that can receive emails from POP3 and IMAP. I am already using Spring in the project so preference is Spring.
Lots of links point to James but while it does look like a good project does not provide enough documentation and I am not even sure it does what I am after i.e just a small client that is able to to receive emails.
Spring integration was designed to solve these kind of problems. In particular it has e-mail receiving adapters. Here is an IMAP example from the documentation:
<mail:inbound-channel-adapter id="imapAdapter"
store-uri="imaps://[username]:[password]#imap.gmail.com/INBOX"
java-mail-properties="javaMailProperties"
channel="recieveChannel"
should-delete-messages="true"
should-mark-messages-as-read="true"
auto-startup="true">
<int:poller max-messages-per-poll="1" fixed-rate="5000"/>
</mail:inbound-channel-adapter>
POP3 and IMAP are not protocols that receive email. They go out and fetch it from a server.
The official JavaMail API
provides a platform-independent and protocol-independent framework to build mail and messaging applications.
Take a look!
Can someone explain how to send mail in development mode from the gwt jetty
The mode does not matter. The mail is sent on the server-side. You can use commons-email to send emails from a servlet of yours. Check the user guide for a simple example. Note that you will need an SMTP server. For test purposes you can use your google account.
It's nothing about GWT because it runs on the server-side (pure java code) and you can use all the api that written in java. Have a look at java mail api
Hey. I currently want to develop a simple program in Java that sends out email. Not just a few emails, but actually a lot (10k+)
I have a subscribers list that all agree to it, by the way.
Anyway, I cannot send these emails via Gmail or anything like that - They do not allow that many emails to be sent. So the basic question is: How do I send emails by making the actual sending computer an email server?
I'm sure I should use some libraries, I heard about ChillKat or something like that.
Could anyone explain / help me out? Would be very much appreciated.
the library - commons-email, built ontop of the harder to use JavaMail
the servers
James - java based
Postfix - for unix/linux (howto)
many more - there are many smtp servers. Each requires some non-trivial configurations before you can use it in production. It is better to turn to an administrator for this.
James is a very powerful email server base on Java which with you can use the JavaMail API. Moreover James integrate the mailet API which is very usefull to improve the functionality of your mail server.
You can configure it to set the gateway on gmail easily changing the config file. (see this topic)
You can find a very good tuto here about James and mailet: Working with James
I have Java and Flash client applications. What is the best way for the two to communicate without special Flash-specific servers such as BlazeDS or Red5? I am looking for a light client-only solution.
Well, you can make http requests from flash to any url... so if your java server has a point where it can listen to incoming requests and process XML or JSON, your flash client can just make the request to that url. BlazeDS and Red5 just aim to make it simpler by handling the translation for you making it possible to call the server-side functions transparently.
Are they running in a browser (applet and SWF), or are they standalone apps?
If they're running in a browser then you can use javascript. Both Flash and Java are can access javascript. It's fragile, but it works.
If they're running as actual applications then you can have Java open a socket connection on some port. Then Flash can connect to that and they can send XML data back and forth.
I've done both of these, so I know they both work. The javascript thing is fragile, but the socket stuff has worked great.
WebORB for Java may be of some help to you. It integrates with your J2EE code.
For more info:
http://www.themidnightcoders.com/weborb/java/
I'm sorry, I reread your question that you are only looking for a client side solution. In this case, WebORB will not help you. Sorry for the misunderstanding.
There's a Flash implementation of Caucho's Hessian web service protocol. This approach would be similar to using JSon or XML, but is more performant, since Hessian is a binary protocol. If you happen to be using Spring on your server, you can use the Spring/Hessian binding to call you Spring services directly from your Flash application with minimal work.
Merapi Bridge API
Merapi allows developers to connect Adobe AIR applications, written in Adobe Flex to Java applications running on the user's local computer.