Search in sources :

Example 1 with ProxyInitializable

use of com.kyj.fx.voeditor.visual.main.initalize.ProxyInitializable in project Gargoyle by callakrsos.

the class UtubeDownloaderCompositeExam method main.

public static void main(String[] args) throws Exception {
    new SSLInitializable().initialize();
    new ProxyInitializable().initialize();
    launch(args);
}
Also used : SSLInitializable(com.kyj.fx.voeditor.visual.main.initalize.SSLInitializable) ProxyInitializable(com.kyj.fx.voeditor.visual.main.initalize.ProxyInitializable)

Example 2 with ProxyInitializable

use of com.kyj.fx.voeditor.visual.main.initalize.ProxyInitializable in project Gargoyle by callakrsos.

the class MimeConverter method simple.

@Test
public void simple() throws Exception {
    new ProxyInitializable().initialize();
    HtmlEmail email = new HtmlEmail();
    email.setHostName("mail.myserver.com");
    email.addTo("jdoe@somewhere.org", "John Doe");
    // email.setFrom("me@apache.org", "Me");
    email.setSubject("Test email with inline image");
    // embed the image and get the content id
    // URL url = new URL("https://i.stack.imgur.com/r7Nij.jpg?s=32&g=1");
    String cid = email.embed(new File("123.jpg"));
    // set the html message
    email.setHtmlMsg("<html>The apache logo - <img src=\"cid:" + cid + "\"></html>");
    // set the alternative message
    email.setTextMsg("Your email client does not support HTML messages");
    MimeMessage mimeMessage = email.getMimeMessage();
    System.out.println(mimeMessage);
    System.out.println(email.sendMimeMessage());
    // send the email
    email.send();
}
Also used : ProxyInitializable(com.kyj.fx.voeditor.visual.main.initalize.ProxyInitializable) MimeMessage(javax.mail.internet.MimeMessage) HtmlEmail(org.apache.commons.mail.HtmlEmail) File(java.io.File) Test(org.junit.Test)

Example 3 with ProxyInitializable

use of com.kyj.fx.voeditor.visual.main.initalize.ProxyInitializable in project Gargoyle by callakrsos.

the class MailPopReceiver method main.

public static void main(String[] args) throws Exception {
    new ProxyInitializable().initialize();
    new SSLInitializable().initialize();
    //change accordingly  
    String host = "pop.naver.com";
    String mailStoreType = "pop3";
    String username = "";
    //change accordingly  
    String password = "";
    MailPopReceiver mailPopReceiver = new MailPopReceiver(host, mailStoreType, username, password);
    InetSocketAddress addr = new InetSocketAddress("168.219.61.252", 8080);
    mailPopReceiver.setProxy(addr);
    mailPopReceiver.receiveEmail();
}
Also used : SSLInitializable(com.kyj.fx.voeditor.visual.main.initalize.SSLInitializable) ProxyInitializable(com.kyj.fx.voeditor.visual.main.initalize.ProxyInitializable) InetSocketAddress(java.net.InetSocketAddress)

Example 4 with ProxyInitializable

use of com.kyj.fx.voeditor.visual.main.initalize.ProxyInitializable in project Gargoyle by callakrsos.

the class NrchRealtimeSearchExam method main.

public static void main(String[] args) throws Exception {
    new ProxyInitializable().initialize();
    new SSLInitializable().initialize();
    launch(args);
}
Also used : SSLInitializable(com.kyj.fx.voeditor.visual.main.initalize.SSLInitializable) ProxyInitializable(com.kyj.fx.voeditor.visual.main.initalize.ProxyInitializable)

Example 5 with ProxyInitializable

use of com.kyj.fx.voeditor.visual.main.initalize.ProxyInitializable in project Gargoyle by callakrsos.

the class MailUtilTest method init.

@Before
public void init() throws Exception {
    System.out.println("proxy settings..");
    new ProxyInitializable().initialize();
}
Also used : ProxyInitializable(com.kyj.fx.voeditor.visual.main.initalize.ProxyInitializable) Before(org.junit.Before)

Aggregations

ProxyInitializable (com.kyj.fx.voeditor.visual.main.initalize.ProxyInitializable)8 SSLInitializable (com.kyj.fx.voeditor.visual.main.initalize.SSLInitializable)3 Before (org.junit.Before)2 JavaSVNManager (com.kyj.scm.manager.svn.java.JavaSVNManager)1 File (java.io.File)1 InetSocketAddress (java.net.InetSocketAddress)1 Properties (java.util.Properties)1 MimeMessage (javax.mail.internet.MimeMessage)1 HtmlEmail (org.apache.commons.mail.HtmlEmail)1 Test (org.junit.Test)1