sfs2x send email

2488 단어 email
Email myEmail = new SFSEmail("[email protected]", "[email protected]", "Test mail", "Hello from SFS2X");

        try {

            SmartFoxServer.getInstance().getMailService().sendMail(myEmail);

        } catch (MessagingException e) {

            e.printStackTrace();

        }

 
xml 설정:config\server.xml
  <mailer>

    <isActive>true</isActive>

    <mailHost>smtp.126.com</mailHost>

    <mailUser>[email protected]</mailUser>

    <mailPass>xxx</mailPass>

    <smtpPort>25</smtpPort>

    <workerThreads>1</workerThreads>

  </mailer>

좋은 웹페이지 즐겨찾기