BANGALORE, INDIA: While building Web sites, Java developers have to sometimes provide functionality of allowing user to submit feedback by an email account; or a functionality wherein logged-in users can send messages as emails to customers or clients from a common account. For providing such functionality there's a Java API called JavaMail API. It provides a mail and messaging framework that can be used to send messages from the host mail server.
For cases where the website hosting provider does not provide a mail server, developers are forced to save the users' feedback to a database and retrieve information from there later. In such a situation Google Mail comes to the rescue. In this article we will see through a demo app how to incorporate a user's feedback form submission through the JavaMail API and the feedback data being sent to a Gmail account.
Direct Hit!
About JavaMail API JavaMail API provides a complete set of abstract classes defining objects that would comprise a complete mail system. With this API, Java has given developers a platform from which they can create their own mailing system app that can not only send but also receive messages. The JavaMail API has support for different messaging system implementations like Message class for messaging details such as subject line, etc, store class for different message privileges like read, write, etc, and Transport class for message sending over a particular protocol.
JavaMail subclasses also expose additional messaging system features, for instance, the MimeMessage sub class that exposes and implements characteristics of an Internet mail message that are as per RFC822 and MIME standards. Developers can now subclass the JavaMail classes to provide them with implementations for particular messaging systems, such as IMAP, POP3, and SMTP. By using these abstract classes the base can be configured for defining the client application for a messaging system.
Get most out of your technology infrastructure investments with Dell
About CIOL | Media Kit | Site Map | Contact Us | Help | Write to us | Jobs@CyberMedia | Privacy Policy
Copyright © CyberMedia India Online Ltd. All rights reserved. Usage of content from web site is subject to Terms and Conditions.