commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kumar (JIRA)" <j...@apache.org>
Subject [jira] Created: (EMAIL-90) Email not working intermittently
Date Wed, 21 Oct 2009 15:56:59 GMT
Email not working intermittently
--------------------------------

                 Key: EMAIL-90
                 URL: https://issues.apache.org/jira/browse/EMAIL-90
             Project: Commons Email
          Issue Type: Bug
    Affects Versions: 1.1
         Environment: Websphere Enterprise Service Bus 6.1 (having WAS 6.1.15) on Windows
& Redhat Linux OS
            Reporter: Kumar


We have an email message sent in HTMLMessage format.

Sample code is given below:
*******************************

	public static void sendEmail(String emailTo,String emailFrom, String emailCC, String hostName,
int smptPort, String msg, String subject){
		log.info(Constants.ENTER);
		
		// Create the email message
		HtmlEmail email = new HtmlEmail();
		email.setHostName(hostName);
		email.setSmtpPort(smptPort);
		
		
		try {
			email.setDebug(true);
			String[] stArr = emailTo.split(",");
			for(int i=0; i< stArr.length; i++){
				log.info("stArr : " + stArr[i]);
				email.addTo(stArr[i]);
			}
			// email.addTo(emailTo, "");
			email.addCc(emailCC);
			email.setFrom(emailFrom, "");
			// email.setMsg(msg);
			email.setSubject(subject);
			email.setHtmlMsg(msg);
			email.send();
		} catch (EmailException e1) {
//			log.error(e1);
			log.debug(e1);
		}		
		log.info(Constants.EXIT);
	}


While sending email from Websphere 6.1, it is not working intermittently.

I've provided the log here while it is not working (our email hub server doesn't need any
authentication, so authentication is not set within the process)
******************************************************************************************************************************************************************
[10/20/09 23:00:15:534 BST] 000004d6 SystemOut     O DEBUG: JavaMail version 1.3.1
[10/20/09 23:00:15:534 BST] 000004d6 SystemOut     O DEBUG: java.io.FileNotFoundException:
/opt/ibm/WebSphere/ESB/java/jre/lib/javamail.providers (No such file or directory)
[10/20/09 23:00:15:534 BST] 000004d6 SystemOut     O DEBUG: !anyLoaded
[10/20/09 23:00:15:534 BST] 000004d6 SystemOut     O DEBUG: not loading resource: /META-INF/javamail.providers
[10/20/09 23:00:15:535 BST] 000004d6 SystemOut     O DEBUG: successfully loaded resource:
/META-INF/javamail.default.providers
[10/20/09 23:00:15:535 BST] 000004d6 SystemOut     O DEBUG: Tables of loaded providers
[10/20/09 23:00:15:564 BST] 000004d6 SystemOut     O DEBUG: Providers Listed By Class Name:
{com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun
Microsystems, Inc], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun
Microsystems, Inc], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun
Microsystems, Inc]}
[10/20/09 23:00:15:564 BST] 000004d6 SystemOut     O DEBUG: Providers Listed By Protocol:
{imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun
Microsystems, Inc], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun
Microsystems, Inc]}
[10/20/09 23:00:15:564 BST] 000004d6 SystemOut     O DEBUG: successfully loaded resource:
/META-INF/javamail.default.address.map
[10/20/09 23:00:15:565 BST] 000004d6 SystemOut     O DEBUG: !anyLoaded
[10/20/09 23:00:15:565 BST] 000004d6 SystemOut     O DEBUG: not loading resource: /META-INF/javamail.address.map
[10/20/09 23:00:15:565 BST] 000004d6 SystemOut     O DEBUG: java.io.FileNotFoundException:
/opt/ibm/WebSphere/ESB/java/jre/lib/javamail.address.map (No such file or directory)
[10/20/09 23:00:15:575 BST] 000004d6 SystemOut     O DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun
Microsystems, Inc]
[10/20/09 23:00:15:583 BST] 000004d6 SystemOut     O DEBUG SMTP: useEhlo true, useAuth true


I've provided the log here while it is working fine
***************************************************

[10/21/09 15:32:02:841 BST] 00000046 SystemOut     O DEBUG: JavaMail version 1.3.1
[10/21/09 15:32:02:841 BST] 00000046 SystemOut     O DEBUG: java.io.FileNotFoundException:
/opt/ibm/WebSphere/ESB/java/jre/lib/javamail.providers (No such file or directory)
[10/21/09 15:32:02:842 BST] 00000046 SystemOut     O DEBUG: !anyLoaded
[10/21/09 15:32:02:842 BST] 00000046 SystemOut     O DEBUG: not loading resource: /META-INF/javamail.providers
[10/21/09 15:32:02:843 BST] 00000046 SystemOut     O DEBUG: successfully loaded resource:
/META-INF/javamail.default.providers
[10/21/09 15:32:02:843 BST] 00000046 SystemOut     O DEBUG: Tables of loaded providers
[10/21/09 15:32:02:843 BST] 00000046 SystemOut     O DEBUG: Providers Listed By Class Name:
{com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun
Microsystems, Inc], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun
Microsystems, Inc], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun
Microsystems, Inc]}
[10/21/09 15:32:02:843 BST] 00000046 SystemOut     O DEBUG: Providers Listed By Protocol:
{imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun
Microsystems, Inc], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun
Microsystems, Inc]}
[10/21/09 15:32:02:843 BST] 00000046 SystemOut     O DEBUG: successfully loaded resource:
/META-INF/javamail.default.address.map
[10/21/09 15:32:02:844 BST] 00000046 SystemOut     O DEBUG: !anyLoaded
[10/21/09 15:32:02:844 BST] 00000046 SystemOut     O DEBUG: not loading resource: /META-INF/javamail.address.map
[10/21/09 15:32:02:844 BST] 00000046 SystemOut     O DEBUG: java.io.FileNotFoundException:
/opt/ibm/WebSphere/ESB/java/jre/lib/javamail.address.map (No such file or directory)
[10/21/09 15:32:02:852 BST] 00000046 SystemOut     O DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun
Microsystems, Inc]
[10/21/09 15:32:02:852 BST] 00000046 SystemOut     O DEBUG SMTP: useEhlo true, useAuth false
[10/21/09 15:32:02:852 BST] 00000046 SystemOut     O DEBUG SMTP: trying to connect to host
"mailhub.tgb.toyota.co.uk", port 25

[10/21/09 15:32:02:991 BST] 00000046 SystemOut     O 220 mailgate1 ESMTP - Unauthorised use
is forbidden
[10/21/09 15:32:02:991 BST] 00000046 SystemOut     O DEBUG SMTP: connected to host "mailgate1",
port: 25

[10/21/09 15:32:02:991 BST] 00000046 SystemOut     O EHLO wasserver1
[10/21/09 15:32:03:032 BST] 00000046 SystemOut     O 250-mailgate1 Hello wasserver1 [112.11.11.111],
pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-DELIVERBY
250 HELP

Can you please let me know what needs to be done to avoid this problem, every time whenever
we had this issue, we restart the server, then it start working fine.

Thanks
Kumar

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message