Correos Masivos: Uno de nuestros productos que abaratan los costos en los procesos de entrega de información a nuestros clientes y nuestro granito de arena con la lucha sobre los problemas ecológicos de nuestro planeta y disminuir la contaminación ambiental.
Con estas dos lineas introductorias vamos a pasar a directamente a nuestro producto: EMAILING un estudio completo a la API JavaMail, oviamente desarrollado en JAVA.
¿Estudio Completo?, ¿Muy arrogante verdad?, pero es cierto un estudio completo para solucionar las necesidades de nuestro cliente. Aqui detallamos las necesidades del cliente y lo que nuestro producto realiza:
1.- Enviar correos masivos.
2.- Que las entregas sean seguras
3.- Que tengamos certeza de la entrega
5.- Que la eficiencias del proceso de entrega del correo sea al 100%
PRUEBA DE CONCEPTO PARA DESARROLLAR NUESTRO PRODUCTO EMAILING CON JAVAMAIL.
Requerimientos de Software | |
1.- Java SE Development Kit 5.0u22 4.- Fuentes en GitHub en la Carpeta AppEmailing 5.- ECLIPSE |
Estas especificaciones por lo general se debe a la arquitectura del cliente, nuestro cliente ya va muchos años utilizando esta tecnología y por ello personalizaremos nuestro producto a sus necesidades. y asociamos las URL de cada producto y ademas estas pruebas lo podrá bajar desde nuestro repositorio CODIGO FUENTE JAVA por cuestiones de orden dejaremos todo lo que se prueba aquí en la carpeta AppEmailing, utilizaremos la ultima versión de eclipse y si encuentran incompatiblidad de su IDE con nuestra versión vamos a dejar el comamdo de prueba en consola que podrá ejecutar en cualquier plataforma para ello solo sera necesario instalar el JDK y MAVEN, para los usuarios que requieren comprender mas sobre MAVEN les dejo aquí el TUTORIAL MAVEN |
CONCEPTOS CLAVE
1.- Trabajando con el protocolo SMTP , este trozo de código nos permitirá el envío del correo y sera nuestro punto de partida en la comunicación entre servidores de correo.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
import java.awt.*; import java.awt.event.*; import java.net.URL; import javax.swing.*; /** Test setting Swing's JComponents properties and appearances */ @SuppressWarnings("serial") public class SwingJComponentSetterTest extends JFrame { // Image path relative to the project root (i.e., bin) private String imgCrossFilename = "images/cross.gif"; private String imgNoughtFilename = "images/nought.gif"; /** Constructor to setup the GUI */ public SwingJComponentSetterTest() { // Prepare ImageIcons to be used with JComponents ImageIcon iconCross = null; ImageIcon iconNought = null; URL imgURL = getClass().getClassLoader().getResource(imgCrossFilename); if (imgURL != null) { iconCross = new ImageIcon(imgURL); } else { System.err.println("Couldn't find file: " + imgCrossFilename); } imgURL = getClass().getClassLoader().getResource(imgNoughtFilename); if (imgURL != null) { iconNought = new ImageIcon(imgURL); } else { System.err.println("Couldn't find file: " + imgNoughtFilename); } Container cp = getContentPane(); cp.setLayout(new FlowLayout(FlowLayout.CENTER, 10, 10)); // Create a JLabel with text and icon and set its appearances JLabel label = new JLabel("JLabel", iconCross, SwingConstants.CENTER); label.setFont(new Font(Font.DIALOG, Font.ITALIC, 14)); label.setOpaque(true); // needed for JLabel to show the background color label.setBackground(new Color(204, 238, 241)); // light blue label.setForeground(Color.RED); // foreground text color label.setPreferredSize(new Dimension(120, 80)); label.setToolTipText("This is a JLabel"); // Tool tip cp.add(label); // Create a JButton with text and icon and set its appearances JButton button = new JButton(); // use setter to set text and icon button.setText("Button"); button.setIcon(iconNought); button.setVerticalAlignment(SwingConstants.BOTTOM); // of text and icon button.setHorizontalAlignment(SwingConstants.RIGHT); // of text and icon button.setHorizontalTextPosition(SwingConstants.LEFT); // of text relative to icon button.setVerticalTextPosition(SwingConstants.TOP); // of text relative to icon button.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 15)); button.setBackground(new Color(231, 240, 248)); button.setForeground(Color.BLUE); button.setPreferredSize(new Dimension(150, 80)); button.setToolTipText("This is a JButton"); button.setMnemonic(KeyEvent.VK_B); // can activate via Alt-B (buttons only) cp.add(button); // Create a JTextField with text and icon and set its appearances JTextField textField = new JTextField("Text Field", 15); textField.setFont(new Font(Font.DIALOG_INPUT, Font.PLAIN, 12)); textField.setForeground(Color.RED); textField.setHorizontalAlignment(JTextField.RIGHT); // Text alignment textField.setToolTipText("This is a JTextField"); cp.add(textField); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setTitle("JComponent Test"); setLocationRelativeTo(null); // center window on the screen setSize(500, 150); // or pack() setVisible(true); // Print description of the JComponents via toString() System.out.println(label); System.out.println(button); System.out.println(textField); } /** The entry main() method */ public static void main(String[] args) { // Run the GUI codes on Event-Dispatching thread for thread safety SwingUtilities.invokeLater(new Runnable() { @Override public void run() { new SwingJComponentSetterTest(); // Let the constructor do the job } }); } } |
BIBLIOGRAFIA
Me gusto leer los siguientes enlaces de algunos de ellos tome cierto trozo de código se les agradece: