⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testformatutil.java

📁 create the email in the server
💻 JAVA
字号:
/*
 * Created on 2005/10/26
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package za.co.halo.SecureCommunications.util;

import java.util.Vector;

import za.co.halo.SecureCommunications.Email;

/**
 * @author K.C.Engelbrecht
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class TestFormatUtil {

    public static void main(String[] args) 
    {
        Vector<String> rcpts1 = new Vector<String>();
        Vector<String> rcpts2 = new Vector<String>();
        rcpts1.addElement("Anlien de Lange <s23152835@tuks.co.za>");
        Vector<String> bccs1 = new Vector<String>();
        Vector<String> css1 = new Vector<String>();        
        Vector<String> message = new Vector<String>();
        message.addElement("SMTP test");
        Vector<Email> e = new Vector<Email>();       
        Email mail1 = new Email("hello", "s21196258@tuks.co.za", rcpts1, bccs1, css1, "s21196258@tuks.co.za", message, "today", "halo_v.1.0");
        
        
        FormatUtil util = new FormatUtil();
        Email mail = util.readEML("D:\\kepler.eml");
        System.out.println("Sender: " + mail.getSender());
        System.out.println("Recipients: " + mail.getReceiver());
        System.out.println("Cc: " + mail.getCC());
        System.out.println("Subject: " + mail.getSubject());
        System.out.println("Date: " + mail.getTime());
        System.out.println("Message: " + mail.getMessage());
        
        
        util.writeEML(mail, "D:\\test.eml");
        mail = util.readEML("D:\\kepler.eml");
        System.out.println("Sender: " + mail.getSender());
        System.out.println("Recipients: " + mail.getReceiver());
        System.out.println("Cc: " + mail.getCC());
        System.out.println("Subject: " + mail.getSubject());
        System.out.println("Date: " + mail.getTime());
        System.out.println("Message: " + mail.getMessage());
        
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -