2012-10-12 4 views
1

ICEsoft에 대해 알아보기 시작했습니다. ICEmobile 프로젝트에서 사용자에게 알림을 전송하려고합니다. Tomcat 7, ICEmobile 1.1, ICEfaces 3을 사용하며, IDE는 Eclipse Juno 4.2입니다. 나는 그런 식으로 내 web.xml 파일에서 SMTP 설정을 구성한ICEmobile 프로젝트에서 이메일을 보낼 수 없습니다.

/** from NotificationBean class (ApplicationScoped) **/ 
    // render group is the current session id. 
    public String renderGroup = "renderGroup"; 

    public NotificationBean() { 
     PushRenderer.addCurrentSession(renderGroup); 
    } 

    /** from NotificationController class (ViewScoped) **/ 
    NotificationBean notifBean = (NotificationBean)FacesUtils.getManagedBean("notificationBean"); 
    public void sendPriorityPushMessage(ActionEvent event) { 
     final PushMessage myMessage = new PushMessage(notifBean.getSubject(), notifBean.getMessage()); 
     final PortableRenderer portable = PushRenderer.getPortableRenderer(); 
     ... 
     portable.render(notifBean.renderGroup, myMessage); 
     ... 

    } 

: 다음은 렌더링 메시지에 대한 몇 가지 코드 조각입니다

smtp.host : smtp.gmail.com

smtp.from : [email protected]

smtp.port : 465

smtp.user : [email protected]

거짓

내가 ICEmobile 컨테이너에서, 안드로이드 에뮬레이터에서이 모든 테스트입니다 (4.1 - SSL

smtp.verify 서버 인증서 :

smtp.password ...

smtp.security , 16 + Google API). C2DM Notify 속성을 선택 취소하고 "전자 메일 알림"에 전자 메일 주소를 입력했습니다.

이메일을 보낼 수 없습니다. 이러한 오류가 발생합니다.

WARNING: Failed to send email message. 
javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465; 
    nested exception is: 
    java.net.SocketException: Connection reset 
    at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1934) 
    at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:638) 
    at javax.mail.Service.connect(Service.java:295) 
    at org.icepush.EmailNotificationProvider$SendMessage.run(EmailNotificationProvider.java:138) 
Caused by: java.net.SocketException: Connection reset 
    at java.net.SocketInputStream.read(Unknown Source) 
    at com.sun.net.ssl.internal.ssl.InputRecord.readFully(Unknown Source) 
    at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source) 
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source) 
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source) 
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source) 
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source) 
    at com.sun.mail.util.SocketFetcher.configureSSLSocket(SocketFetcher.java:507) 
    at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:238) 
    at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1900) 

누락 된 부분이 있습니까? 나는 Tomcat을 구성하려고 시도했으나 올바르게 수행하는 방법을 모른다. 아마도 그 단서가 그 것이다. 사전에

감사합니다, 이리나

답변

0

나는 나의 mail.jar을 업데이트하여이 문제를 해결. 내 것이 너무 컸다.

관련 문제