用javamail发邮件(含附件),用jBuilder3实现

作者:袖梨 2022-07-02
//Title:        Your Product Name
//Version:
//Copyright:    Copyright (c) 1999
//Author:       Your Name
//Company:      Your Company
//Description:  Your description
package Mail;
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.util.*;
import java.io.*;
import javax.mail.*;
import javax.mail.internet.*;
import javax.activation.*;
public class SendMail extends Frame {
  Label label1 = new Label();
  TextField textField1 = new TextField();
  Label label2 = new Label();
  TextField textField2 = new TextField();
  Label label3 = new Label();
  TextArea textArea1 = new TextArea();
  Label label4 = new Label();
  TextField textField3 = new TextField();
  Button button1 = new Button();
  Button button2 = new Button();
  public SendMail() {
   enableEvents(AWTEvent.WINDOW_EVENT_MASK);
    try  {
      jbInit();
    }
    catch(Exception e) {
      e.printStackTrace();
    }
  }
    protected void processWindowEvent(WindowEvent e) {
    super.processWindowEvent(e);
    if(e.getID() == WindowEvent.WINDOW_CLOSING) {
      System.exit(0);
    }
  }
  public static void main(String[] args) {
    SendMail sendMail1 = new SendMail();
    sendMail1.setSize (400,400);

相关文章

精彩推荐