Using java to compile mail sending and receiving program

I want to write a mail sending and receiving program in java . I do n't know where to start. Is there a server? Please give me some advice. I am a beginner, I don't have many points, thank you. --- ---solution--------------------------------------------- ----------- import java.awt.*; import java.awt.event.*; import java.util.*; import java.net.*; import java.io.*; import javax .swing.*; /** This program shows how to use sockets to send plain text mail messages. */ public class MailTest { public static void main(String[] args) { JFrame frame = new MailTestFrame();



















frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
}
}

/**
The frame for the mail GUI.
*/
class MailTestFrame extends JFrame
{
public MailTestFrame()
{
setSize(DEFAULT_WIDTH, DEFAULT_HEIGHT);
setTitle( "MailTest ");

setLayout(new GridBagLayout());

// we use the GBC convenience class of Core Java Volume 1 Chapter 9
add(new JLabel( "From: "), new GBC(0, 0).setFill(GBC.HORIZONTAL));

from = new JTextField(20);
add(from, new GBC(1, 0).setFill(GBC.HORIZONTAL)…………………………………………………………………………

Reference address: http://www.verydemo.com/demo_c89_i56637.html

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326570234&siteId=291194637