Piyush Doraya

Greenhorn
+ Follow
since Feb 21, 2012
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Piyush Doraya

Yohan Weerasinghe wrote:

paddy smith wrote:Thank you for your quick reply.

I can do understand.......



You are welcome



Hi All,

Can any of you provide info on following issue :

I created API to put mail on external SMTP server. On running the code following issue has been observed:

javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed;
boundary="----=_Part_0_1731747840.1331020495293"
at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:877)
at javax.activation.DataHandler.writeTo(DataHandler.java:302)
at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1476)
at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1772)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1099)
at javax.mail.Transport.send0(Transport.java:195)
at javax.mail.Transport.send(Transport.java:124)
at SMTPAuthenticator.main(SMTPAuthenticator.java:82)
javax.mail.MessagingException: IOException while sending message;
nested exception is:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed;
boundary="----=_Part_0_1731747840.1331020495293"
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1141)
at javax.mail.Transport.send0(Transport.java:195)
at javax.mail.Transport.send(Transport.java:124)
at SMTPAuthenticator.main(SMTPAuthenticator.java:82)
Caused by: javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed;
boundary="----=_Part_0_1731747840.1331020495293"
at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:877)
at javax.activation.DataHandler.writeTo(DataHandler.java:302)
at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1476)
at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1772)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1099)
... 3 more

Logs Observed on the console:

DEBUG: JavaMail version 1.4.4
DEBUG: failed to load any providers, using defaults
DEBUG: Tables of loaded providers
DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc.,1.4.4], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc.,1.4.4], com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc.,1.4.4], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.
un.mail.pop3.POP3SSLStore,Sun Microsystems, Inc.,1.4.4], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc.,1.4.4], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc.,1.4.4]}
DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc.,1.4.4], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc.,1.4.4], smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc.,1.4.4], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc.,1.4.4], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPT
ansport,Sun Microsystems, Inc.,1.4.4], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc.,1.4.4]}
DEBUG: failed to load address map, using defaults
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc.,1.4.4]
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "<SMTP Host>", port 25, isSSL false
220 dcdelexc01.Eichergroup.com Microsoft ESMTP MAIL Service, Version: 6.0.3790.1830 ready at Tue, 6 Mar 2012 13:24:55 +0530
DEBUG SMTP: connected to host "<SMTP Host>", port: 25

EHLO <Server Name>
250-<Server Name> Hello [<Server Name>]
250-TURN
250-SIZE
250-ETRN
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-8bitmime
250-BINARYMIME
250-CHUNKING
250-VRFY
250-X-EXPS GSSAPI NTLM LOGIN
250-X-EXPS=LOGIN
250-AUTH GSSAPI NTLM LOGIN
250-AUTH=LOGIN
250-X-LINK2STATE
250-XEXCH50
250 OK
DEBUG SMTP: Found extension "TURN", arg ""
DEBUG SMTP: Found extension "SIZE", arg ""
DEBUG SMTP: Found extension "ETRN", arg ""
DEBUG SMTP: Found extension "PIPELINING", arg ""
DEBUG SMTP: Found extension "DSN", arg ""
DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
DEBUG SMTP: Found extension "8bitmime", arg ""
DEBUG SMTP: Found extension "BINARYMIME", arg ""
DEBUG SMTP: Found extension "CHUNKING", arg ""
DEBUG SMTP: Found extension "VRFY", arg ""
DEBUG SMTP: Found extension "X-EXPS", arg "GSSAPI NTLM LOGIN"
DEBUG SMTP: Found extension "X-EXPS=LOGIN", arg ""
DEBUG SMTP: Found extension "AUTH", arg "GSSAPI NTLM LOGIN"
DEBUG SMTP: Found extension "AUTH=LOGIN", arg ""
DEBUG SMTP: Found extension "X-LINK2STATE", arg ""
DEBUG SMTP: Found extension "XEXCH50", arg ""
DEBUG SMTP: Found extension "OK", arg ""
DEBUG SMTP: Attempt to authenticate
DEBUG SMTP: check mechanisms: LOGIN PLAIN DIGEST-MD5 NTLM
AUTH LOGIN
334 VXNlcm5hbWU6
ZG9ub3RyZXBseQ==
334 UGFzc3dvcmQ6
cEBzc3cwcmQ=
235 2.7.0 Authentication successful.
DEBUG SMTP: use8bit false
MAIL FROM:<yourname@hostname> AUTH=donotreply
250 2.1.0 yourname@hostname....Sender OK
RCPT TO:<yourname@gmail.com>
250 2.1.5 yourname@gmail.com
DEBUG SMTP: Verified Addresses
DEBUG SMTP: yourname@gmail.com
DATA
354 Start mail input; end with <CRLF>.<CRLF>
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed;


10 years ago

Stanley Mungai wrote:Pirush Doraya. Check that you have activation.jar on your class path please.


Files are present in the classpath. Same code working fine when i am trying to send mail to local user i.e. on local domain. But gives error when trying to send same mail to any user in gmail, yahoo domain.
10 years ago

Dear Stanly,
With the mentioned code suggestion following error observed on the console:



Out put observed on console

DEBUG: JavaMail version 1.4.4
DEBUG: failed to load any providers, using defaults
DEBUG: Tables of loaded providers
DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc.,1.4.4], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc.,1.4.4], com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc.,1.4.4], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.
un.mail.pop3.POP3SSLStore,Sun Microsystems, Inc.,1.4.4], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc.,1.4.4], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc.,1.4.4]}
DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc.,1.4.4], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc.,1.4.4], smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc.,1.4.4], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc.,1.4.4], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPT
ansport,Sun Microsystems, Inc.,1.4.4], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc.,1.4.4]}
DEBUG: failed to load address map, using defaults
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc.,1.4.4]
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "<SMTP Host>", port 25, isSSL false
220 dcdelexc01.Eichergroup.com Microsoft ESMTP MAIL Service, Version: 6.0.3790.1830 ready at Tue, 6 Mar 2012 13:24:55 +0530
DEBUG SMTP: connected to host "<SMTP Host>", port: 25

EHLO <Server Name>
250-<Server Name> Hello [<Server Name>]
250-TURN
250-SIZE
250-ETRN
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-8bitmime
250-BINARYMIME
250-CHUNKING
250-VRFY
250-X-EXPS GSSAPI NTLM LOGIN
250-X-EXPS=LOGIN
250-AUTH GSSAPI NTLM LOGIN
250-AUTH=LOGIN
250-X-LINK2STATE
250-XEXCH50
250 OK
DEBUG SMTP: Found extension "TURN", arg ""
DEBUG SMTP: Found extension "SIZE", arg ""
DEBUG SMTP: Found extension "ETRN", arg ""
DEBUG SMTP: Found extension "PIPELINING", arg ""
DEBUG SMTP: Found extension "DSN", arg ""
DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
DEBUG SMTP: Found extension "8bitmime", arg ""
DEBUG SMTP: Found extension "BINARYMIME", arg ""
DEBUG SMTP: Found extension "CHUNKING", arg ""
DEBUG SMTP: Found extension "VRFY", arg ""
DEBUG SMTP: Found extension "X-EXPS", arg "GSSAPI NTLM LOGIN"
DEBUG SMTP: Found extension "X-EXPS=LOGIN", arg ""
DEBUG SMTP: Found extension "AUTH", arg "GSSAPI NTLM LOGIN"
DEBUG SMTP: Found extension "AUTH=LOGIN", arg ""
DEBUG SMTP: Found extension "X-LINK2STATE", arg ""
DEBUG SMTP: Found extension "XEXCH50", arg ""
DEBUG SMTP: Found extension "OK", arg ""
DEBUG SMTP: Attempt to authenticate
DEBUG SMTP: check mechanisms: LOGIN PLAIN DIGEST-MD5 NTLM
AUTH LOGIN
334 VXNlcm5hbWU6
ZG9ub3RyZXBseQ==
334 UGFzc3dvcmQ6
cEBzc3cwcmQ=
235 2.7.0 Authentication successful.
DEBUG SMTP: use8bit false
MAIL FROM:<yourname@hostname> AUTH=donotreply
250 2.1.0 yourname@hostname....Sender OK
RCPT TO:<yourname@gmail.com>
250 2.1.5 yourname@gmail.com
DEBUG SMTP: Verified Addresses
DEBUG SMTP: yourname@gmail.com
DATA
354 Start mail input; end with <CRLF>.<CRLF>
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed;



Do you have any resolution about the exception.


10 years ago
Hi All,

As per the project requirement, API needs to configure in such a way that i should trigger mail to external domain i.e gmail, rediff or yahoo mail ID. To incorporate the requirements following code developed at developers end:
// Code Start Here

// End here.

Logs Observed at Console:

// Logs Started

Hello World!
DEBUG: JavaMail version 1.4.4
DEBUG: failed to load any providers, using defaults
DEBUG: Tables of loaded providers
DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc.,1.4.4],
un.mail.pop3.POP3SSLStore,Sun Microsystems, Inc.,1.4.4], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc.,1.4.4], co
DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc.,1.4.4], imap=javax.mail.Provider[STORE,imap,com
ansport,Sun Microsystems, Inc.,1.4.4], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc.,1.4.4]}
DEBUG: failed to load address map, using defaults
DEBUG: setDebug: JavaMail version 1.4.4
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc.,1.4.4]
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "10.101.1.175", port 25, isSSL false
220 DCDELEVS01.Eichergroup.com Microsoft ESMTP MAIL Service, Version: 6.0.3790.1830 ready at Wed, 22 Feb 2012 09:55:11 +0530
DEBUG SMTP: connected to host "10.101.1.175", port: 25

EHLO it30768.Eichergroup.com
250-DCDELEVS01.Eichergroup.com Hello [10.106.8.59]
250-TURN
250-SIZE 31457280
250-ETRN
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-8bitmime
250-BINARYMIME
250-CHUNKING
250-VRFY
250-X-EXPS GSSAPI NTLM LOGIN
250-X-EXPS=LOGIN
250-AUTH GSSAPI NTLM LOGIN
250-AUTH=LOGIN
250-X-LINK2STATE
250-XEXCH50
250 OK
DEBUG SMTP: Found extension "TURN", arg ""
DEBUG SMTP: Found extension "SIZE", arg "31457280"
DEBUG SMTP: Found extension "ETRN", arg ""
DEBUG SMTP: Found extension "PIPELINING", arg ""
DEBUG SMTP: Found extension "DSN", arg ""
DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
DEBUG SMTP: Found extension "8bitmime", arg ""
DEBUG SMTP: Found extension "BINARYMIME", arg ""
DEBUG SMTP: Found extension "CHUNKING", arg ""
DEBUG SMTP: Found extension "VRFY", arg ""
DEBUG SMTP: Found extension "X-EXPS", arg "GSSAPI NTLM LOGIN"
DEBUG SMTP: Found extension "X-EXPS=LOGIN", arg ""
DEBUG SMTP: Found extension "AUTH", arg "GSSAPI NTLM LOGIN"
DEBUG SMTP: Found extension "AUTH=LOGIN", arg ""
DEBUG SMTP: Found extension "X-LINK2STATE", arg ""
DEBUG SMTP: Found extension "XEXCH50", arg ""
DEBUG SMTP: Found extension "OK", arg ""
DEBUG SMTP: Attempt to authenticate
DEBUG SMTP: check mechanisms: LOGIN PLAIN DIGEST-MD5 NTLM
AUTH LOGIN
334 VXNlcm5hbWU6
ZG9ub3RyZXBseQ==
334 UGFzc3dvcmQ6
cEBzc3cwcmQ=
235 2.7.0 Authentication successful.
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc.,1.4.4]
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "10.101.1.175", port 25, isSSL false
220 DCDELEVS01.Eichergroup.com Microsoft ESMTP MAIL Service, Version: 6.0.3790.1830 ready at Wed, 22 Feb 2012 09:55:12 +0530
DEBUG SMTP: connected to host "10.101.1.175", port: 25

EHLO it30768.Eichergroup.com
250-DCDELEVS01.Eichergroup.com Hello [10.106.8.59]
250-TURN
250-SIZE 31457280
250-ETRN
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-8bitmime
250-BINARYMIME
250-CHUNKING
250-VRFY
250-X-EXPS GSSAPI NTLM LOGIN
250-X-EXPS=LOGIN
250-AUTH GSSAPI NTLM LOGIN
250-AUTH=LOGIN
250-X-LINK2STATE
250-XEXCH50
250 OK
DEBUG SMTP: Found extension "TURN", arg ""
DEBUG SMTP: Found extension "SIZE", arg "31457280"
DEBUG SMTP: Found extension "ETRN", arg ""
DEBUG SMTP: Found extension "PIPELINING", arg ""
DEBUG SMTP: Found extension "DSN", arg ""
DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
DEBUG SMTP: Found extension "8bitmime", arg ""
DEBUG SMTP: Found extension "BINARYMIME", arg ""
DEBUG SMTP: Found extension "CHUNKING", arg ""
DEBUG SMTP: Found extension "VRFY", arg ""
DEBUG SMTP: Found extension "X-EXPS", arg "GSSAPI NTLM LOGIN"
DEBUG SMTP: Found extension "X-EXPS=LOGIN", arg ""
DEBUG SMTP: Found extension "AUTH", arg "GSSAPI NTLM LOGIN"
DEBUG SMTP: Found extension "AUTH=LOGIN", arg ""
DEBUG SMTP: Found extension "X-LINK2STATE", arg ""
DEBUG SMTP: Found extension "XEXCH50", arg ""
DEBUG SMTP: Found extension "OK", arg ""
DEBUG SMTP: Attempt to authenticate
DEBUG SMTP: check mechanisms: LOGIN PLAIN DIGEST-MD5 NTLM
AUTH LOGIN
334 VXNlcm5hbWU6
ZG9ub3RyZXBseQ==
334 UGFzc3dvcmQ6
cEBzc3cwcmQ=
235 2.7.0 Authentication successful.
DEBUG SMTP: use8bit false
MAIL FROM:<xxx@yyy.zz>
250 2.1.0 xxx@yyy.zz....Sender OK
RCPT TO:<xxx@gmail.com>
250 2.1.5 xxx@gmail.com
RCPT TO:<yyy@gmail.com>
250 2.1.5 yyy@gmail.com
RCPT TO:<zzz@gmail.com>
250 2.1.5 zzz@gmail.com
DEBUG SMTP: Verified Addresses
DEBUG SMTP: xxx@gmail.com
DEBUG SMTP: yyy@gmail.com
DEBUG SMTP: zzz@gmail.com
DATA
354 Start mail input; end with <CRLF>.<CRLF>
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed;
boundary="----=_Part_0_723635264.1329884711558"
at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:877)
at javax.activation.DataHandler.writeTo(DataHandler.java:302)
at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1476)
at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1772)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1099)
at javax.mail.Transport.send0(Transport.java:195)
at javax.mail.Transport.send(Transport.java:124)
at SMTPMailClass.sendSMTPMailToUsers(SMTPMailClass.java:95)
at SMTPMailClass.main(SMTPMailClass.java:26)
javax.mail.MessagingException: IOException while sending message;
nested exception is:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed;
boundary="----=_Part_0_723635264.1329884711558"
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1141)
at javax.mail.Transport.send0(Transport.java:195)
at javax.mail.Transport.send(Transport.java:124)
at SMTPMailClass.sendSMTPMailToUsers(SMTPMailClass.java:95)
at SMTPMailClass.main(SMTPMailClass.java:26)
Caused by: javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed;
boundary="----=_Part_0_723635264.1329884711558"
at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:877)
at javax.activation.DataHandler.writeTo(DataHandler.java:302)
at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1476)
at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1772)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1099)
... 4 more
Exception in Sending Mail for =javax.mail.MessagingException: IOException while sending message;
nested exception is:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed;
boundary="----=_Part_0_723635264.1329884711558"

// Logs end



Not sure what going wrong.

Things tried at my end:
Updated Jmail 1.4.4
JAF 1.1

Can any body provide view on it?
10 years ago
Try to check "Is there any authentication required for the SMTP Mail Server", specified in code.

If yes then try to put

Transport trans = ses.getTransport("smtp");

trans.connect("<SMTP Host>","<SMTP Auth User Name>","<SMTP Auth Password>");

for more details please follow the link

http://www.webdeveloper.com/forum/showthread.php?t=143496
10 years ago