Getting javax.mail.AuthenticationFailedException: EOF on socket. Need Help
I am trying to get hotmail emails and store in Oracle 10g database.
When I am executing receivemail procedure from Oracle 10g database. I am getting following error.
connect to ESIMSCO_UTIL_OWNER
SQL> set serveroutput on
SQL>
SQL> Declare
2 v_error_msg varchar2(10000);
3 Begin
4 v_error_msg:=receivemail('pop3.live.com', '<My email address>@hotmail.com', '<My email password>');
5 dbms_output.put_line(v_error_msg);
6 End;
7 /
javax.mail.AuthenticationFailedException: EOF on socket
PL/SQL procedure successfully completed.
SQL>
I did following steps, but still I am getting this error. Can somebady help me to solve this problem.
connect sys/<password>@esimsco as sysdba
connect to sys
SQL*Plus: Release 10.2.0.1.0 - Production on Wed May 30 16:02:04 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> begin
1 dbms_java.grant_permission( 'ESIMSCO_UTIL_OWNER', 'SYS:java.util.PropertyPermission', '*', 'read,write' );
2 commit;
3 end;
4 /
PL/SQL procedure successfully completed.
SQL> begin
2 dbms_java.grant_permission(
3 grantee => 'ESIMSCO_UTIL_OWNER',
4 permission_type => 'SYS:java.net.SocketPermission',
5 permission_name => '*',
6 permission_action => 'connect,resolve'
7 );
8 end;
9 /
PL/SQL procedure successfully completed.
SQL> begin
2 dbms_java.grant_permission(
3 grantee => 'ESIMSCO_UTIL_OWNER',
4 permission_type => 'SYS:java.util.PropertyPermission',
5 permission_name => '*',
6 permission_action => 'read,write'
7 );
8 end;
9 /
PL/SQL procedure successfully completed.
SQL> commit;
Commit complete.
SQL>
Then I connect ESIMSCO_UTIL_OWNER.
connect to ESIMSCO_UTIL_OWNER
Create 2 tables.
create table attachment(
at_file varchar2(500),
at_mimetype varchar2(500),
at_attachment blob
create table email (
em_incident integer,
em_from varchar2(1000),
em_subject varchar2(1000),
em_body nclob
Then Create java source named receivemail.
create or replace and compile java source named receivemail as
import javax.mail.*;
import javax.mail.internet.*;
import java.util.*;
import java.io.*;
import java.sql.*;
import sqlj.runtime.*;
import oracle.sql.BLOB;
public class ReceiveMail
static void getAttachments(Message message, int incidentNo)
throws MessagingException, IOException, SQLException {
//String attachments = "";
Object content = message.getContent();
if (content instanceof Multipart)
// -- Multi part message which may contain attachment
Multipart multipart = (Multipart)message.getContent();
// -- Loop through all parts of the message
for (int i=0, n=multipart.getCount(); i<n; i++) {
Part part = multipart.getBodyPart(i);
String disposition = part.getDisposition();
if ((disposition != null) &&(disposition.equals(Part.ATTACHMENT) || disposition.equals(Part.INLINE))) {
//-- This part is a file attachment
String fileName = incidentNo+"_"+part.getFileName().replace(' ','_');
System.out.println("FILE: " + fileName);
String contentType = part.getContentType();
String mimeType = contentType.substring(0,contentType.indexOf(";"));
System.out.println("FILETYPE: " + mimeType);
InputStream is = part.getInputStream();
// -- To work with a BLOB column you have to insert a record
// -- with an emptly BLOB first.
#sql { insert into attachment(at_file, at_mimetype, at_attachment)
values (:fileName, :mimeType, empty_blob()) };
// -- Retrieve the BLOB
BLOB attachment = null;
#sql { select at_attachment into :attachment
from attachment where at_file = :fileName };
// -- Fill the BLOB
OutputStream os = attachment.getBinaryOutputStream();
int j;
while ((j = is.read()) != -1) {
os.write(j);
is.close();
os.close();
// -- Set the BLOB by updating the record
#sql { update attachment set at_attachment = :attachment
where at_file = :fileName };
static String getPlainTextBody(Message message)
throws MessagingException, IOException
Object content = message.getContent();
if (message.isMimeType("text/plain")) {
// -- Message has plain text body only
System.out.println("SIMPLE TEXT");
return (String) content;
} else if (message.isMimeType("multipart/*")) {
// -- Message is multipart. Loop through the message parts to retrieve
// -- the body.
Multipart mp = (Multipart) message.getContent();
int numParts = mp.getCount();
System.out.println("MULTIPART: "+numParts);
for (int i = 0; i < numParts; ++i) {
System.out.println("PART: "+mp.getBodyPart(i).getContentType());
if (mp.getBodyPart(i).isMimeType("text/plain")) {
// -- Return the plain text body
return (String) mp.getBodyPart(i).getContent();
} else if (mp.getBodyPart(i).isMimeType("multipart/*")) {
// -- Body is also multipart (both plain text and html).
// -- Loop through the body parts to retrieve plain text part.
MimeMultipart mmp = (MimeMultipart) mp.getBodyPart(i).getContent();
int numBodyParts = mmp.getCount();
System.out.println("MULTIBODYPART: "+numBodyParts);
for (int j = 0; j < numBodyParts; ++j) {
System.out.println("BODYPART: "+mmp.getBodyPart(j).getContentType());
if (mmp.getBodyPart(j).isMimeType("text/plain")) {
// -- Return the plain text body
return (String) mmp.getBodyPart(j).getContent();
return "";
} else {
System.out.println("UNKNOWN: "+message.getContentType());
return "";
static void saveMessage(Message message)
throws MessagingException, IOException, SQLException
//String body = "";
int incidentNo;
// -- Get a new incident number
#sql { select seq_incident.nextval into :incidentNo from dual };
// -- Get the header information
String from = ((InternetAddress)message.getFrom()[0]).getAddress();
System.out.println("FROM: "+ from);
String subject = message.getSubject();
System.out.println("SUBJECT: "+subject);
// -- Retrieve the plain text body
String body = getPlainTextBody(message);
// -- Store the message in the email table
#sql { insert into email (em_incident, em_from, em_subject, em_body)
values (:incidentNo, :from, :subject, :body) };
// -- Retrieve the attachments
getAttachments(message, incidentNo);
#sql { commit };
// -- Mark message for deletion
// message.setFlag(Flags.Flag.DELETED, true);
public static String Receive(String POP3Server, String usr, String pwd)
Store store = null;
Folder folder = null;
try
// -- Get hold of the default session --
Properties props = System.getProperties();
props.put("mail.pop3.connectiontimeout", "60000");
Session session = Session.getDefaultInstance(props, null);
// -- Get hold of a POP3 message store, and connect to it --
store = session.getStore("pop3");
store.connect(POP3Server,995, usr, pwd);
System.out.println("Connected");
// -- Try to get hold of the default folder --
folder = store.getDefaultFolder();
if (folder == null) throw new Exception("No default folder");
// -- ...and its INBOX --
folder = folder.getFolder("INBOX");
if (folder == null) throw new Exception("No POP3 INBOX");
// -- Open the folder for read_write (to be able to delete message) --
folder.open(Folder.READ_WRITE);
// -- Get the message wrappers and process them --
Message[] msgs = folder.getMessages();
for (int msgNum = 0; msgNum < msgs.length; msgNum++){
saveMessage(msgs[msgNum]);
System.out.println("No more messages");
return ("SUCCESS");
catch (Exception ex){
ex.printStackTrace();
return ex.toString();
finally{
// -- Close down nicely --
try{
// close(true), to expunge deleted messages
if (folder!=null) folder.close(true);
if (store!=null) store.close();
catch (Exception ex){
//ex.printStackTrace();
return ex.toString();
Then create function receivemail.
create or replace function receivemail(pop3_server in string,
pop3_usr in string,
pop3_pwd in string)
return varchar2
is language java name
'ReceiveMail.Receive(java.lang.String,
java.lang.String,
java.lang.String) return String';
And then trying to execute function receivemail, but I am getting following error.
SQL> set serveroutput on
SQL>
SQL> Declare
2 v_error_msg varchar2(10000);
3 Begin
4 v_error_msg:=receivemail('pop3.live.com', '<Hotmail email address>@hotmail.com', 'Hotmail password');
5 dbms_output.put_line(v_error_msg);
6 End;
7 /
javax.mail.AuthenticationFailedException: EOF on socket
PL/SQL procedure successfully completed.
SQL>
I am requesting, please help me to solve this problem.
I will be very thankful for your kind help and support.
Amol......
Edited by: Amol Karyakarte on 31-May-2012 7:27 AM
Hello,
I don't think this is the right forum, as this question seems to have nothing to do with the Oracle Forms tool.
You'd better ask it in the database forum.
Francois
Similar Messages
-
Help to solve javax.mail.AuthenticationFailedException: EOF on socket
I am trying to get hotmail emails and store in Oracle 10g database.
When I am executing receivemail procedure from Oracle 10g database. I am getting following error.
connect to ESIMSCO_UTIL_OWNER
SQL> set serveroutput on
SQL>
SQL> Declare
2 v_error_msg varchar2(10000);
3 Begin
4 v_error_msg:=receivemail('pop3.live.com', '<My email address>@hotmail.com', '<My email password>');
5 dbms_output.put_line(v_error_msg);
6 End;
7 /
javax.mail.AuthenticationFailedException: EOF on socket
PL/SQL procedure successfully completed.
SQL>
I did following steps, but still I am getting this error. Can somebady help me to solve this problem.
connect sys/<password>@esimsco as sysdba
connect to sys
SQL*Plus: Release 10.2.0.1.0 - Production on Wed May 30 16:02:04 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> begin
1 dbms_java.grant_permission( 'ESIMSCO_UTIL_OWNER', 'SYS:java.util.PropertyPermission', '*', 'read,write' );
2 commit;
3 end;
4 /
PL/SQL procedure successfully completed.
SQL> begin
2 dbms_java.grant_permission(
3 grantee => 'ESIMSCO_UTIL_OWNER',
4 permission_type => 'SYS:java.net.SocketPermission',
5 permission_name => '*',
6 permission_action => 'connect,resolve'
7 );
8 end;
9 /
PL/SQL procedure successfully completed.
SQL> begin
2 dbms_java.grant_permission(
3 grantee => 'ESIMSCO_UTIL_OWNER',
4 permission_type => 'SYS:java.util.PropertyPermission',
5 permission_name => '*',
6 permission_action => 'read,write'
7 );
8 end;
9 /
PL/SQL procedure successfully completed.
SQL> commit;
Commit complete.
SQL>
Then I connect ESIMSCO_UTIL_OWNER.
connect to ESIMSCO_UTIL_OWNER
Create 2 tables.
create table attachment(
at_file varchar2(500),
at_mimetype varchar2(500),
at_attachment blob
create table email (
em_incident integer,
em_from varchar2(1000),
em_subject varchar2(1000),
em_body nclob
Then Create java source named receivemail.
create or replace and compile java source named receivemail as
import javax.mail.*;
import javax.mail.internet.*;
import java.util.*;
import java.io.*;
import java.sql.*;
import sqlj.runtime.*;
import oracle.sql.BLOB;
public class ReceiveMail
static void getAttachments(Message message, int incidentNo)
throws MessagingException, IOException, SQLException {
//String attachments = "";
Object content = message.getContent();
if (content instanceof Multipart)
// -- Multi part message which may contain attachment
Multipart multipart = (Multipart)message.getContent();
// -- Loop through all parts of the message
for (int i=0, n=multipart.getCount(); i<n; i++) {
Part part = multipart.getBodyPart(i);
String disposition = part.getDisposition();
if ((disposition != null) &&(disposition.equals(Part.ATTACHMENT) || disposition.equals(Part.INLINE))) {
//-- This part is a file attachment
String fileName = incidentNo+"_"+part.getFileName().replace(' ','_');
System.out.println("FILE: " + fileName);
String contentType = part.getContentType();
String mimeType = contentType.substring(0,contentType.indexOf(";"));
System.out.println("FILETYPE: " + mimeType);
InputStream is = part.getInputStream();
// -- To work with a BLOB column you have to insert a record
// -- with an emptly BLOB first.
#sql { insert into attachment(at_file, at_mimetype, at_attachment)
values (:fileName, :mimeType, empty_blob()) };
// -- Retrieve the BLOB
BLOB attachment = null;
#sql { select at_attachment into :attachment
from attachment where at_file = :fileName };
// -- Fill the BLOB
OutputStream os = attachment.getBinaryOutputStream();
int j;
while ((j = is.read()) != -1) {
os.write(j);
is.close();
os.close();
// -- Set the BLOB by updating the record
#sql { update attachment set at_attachment = :attachment
where at_file = :fileName };
static String getPlainTextBody(Message message)
throws MessagingException, IOException
Object content = message.getContent();
if (message.isMimeType("text/plain")) {
// -- Message has plain text body only
System.out.println("SIMPLE TEXT");
return (String) content;
} else if (message.isMimeType("multipart/*")) {
// -- Message is multipart. Loop through the message parts to retrieve
// -- the body.
Multipart mp = (Multipart) message.getContent();
int numParts = mp.getCount();
System.out.println("MULTIPART: "+numParts);
for (int i = 0; i < numParts; ++i) {
System.out.println("PART: "+mp.getBodyPart(i).getContentType());
if (mp.getBodyPart(i).isMimeType("text/plain")) {
// -- Return the plain text body
return (String) mp.getBodyPart(i).getContent();
} else if (mp.getBodyPart(i).isMimeType("multipart/*")) {
// -- Body is also multipart (both plain text and html).
// -- Loop through the body parts to retrieve plain text part.
MimeMultipart mmp = (MimeMultipart) mp.getBodyPart(i).getContent();
int numBodyParts = mmp.getCount();
System.out.println("MULTIBODYPART: "+numBodyParts);
for (int j = 0; j < numBodyParts; ++j) {
System.out.println("BODYPART: "+mmp.getBodyPart(j).getContentType());
if (mmp.getBodyPart(j).isMimeType("text/plain")) {
// -- Return the plain text body
return (String) mmp.getBodyPart(j).getContent();
return "";
} else {
System.out.println("UNKNOWN: "+message.getContentType());
return "";
static void saveMessage(Message message)
throws MessagingException, IOException, SQLException
//String body = "";
int incidentNo;
// -- Get a new incident number
#sql { select seq_incident.nextval into :incidentNo from dual };
// -- Get the header information
String from = ((InternetAddress)message.getFrom()[0]).getAddress();
System.out.println("FROM: "+ from);
String subject = message.getSubject();
System.out.println("SUBJECT: "+subject);
// -- Retrieve the plain text body
String body = getPlainTextBody(message);
// -- Store the message in the email table
#sql { insert into email (em_incident, em_from, em_subject, em_body)
values (:incidentNo, :from, :subject, :body) };
// -- Retrieve the attachments
getAttachments(message, incidentNo);
#sql { commit };
// -- Mark message for deletion
// message.setFlag(Flags.Flag.DELETED, true);
public static String Receive(String POP3Server, String usr, String pwd)
Store store = null;
Folder folder = null;
try
// -- Get hold of the default session --
Properties props = System.getProperties();
props.put("mail.pop3.connectiontimeout", "60000");
Session session = Session.getDefaultInstance(props, null);
// -- Get hold of a POP3 message store, and connect to it --
store = session.getStore("pop3");
store.connect(POP3Server,995, usr, pwd);
System.out.println("Connected");
// -- Try to get hold of the default folder --
folder = store.getDefaultFolder();
if (folder == null) throw new Exception("No default folder");
// -- ...and its INBOX --
folder = folder.getFolder("INBOX");
if (folder == null) throw new Exception("No POP3 INBOX");
// -- Open the folder for read_write (to be able to delete message) --
folder.open(Folder.READ_WRITE);
// -- Get the message wrappers and process them --
Message[] msgs = folder.getMessages();
for (int msgNum = 0; msgNum < msgs.length; msgNum++){
saveMessage(msgs[msgNum]);
System.out.println("No more messages");
return ("SUCCESS");
catch (Exception ex){
ex.printStackTrace();
return ex.toString();
finally{
// -- Close down nicely --
try{
// close(true), to expunge deleted messages
if (folder!=null) folder.close(true);
if (store!=null) store.close();
catch (Exception ex){
//ex.printStackTrace();
return ex.toString();
Then create function receivemail.
create or replace function receivemail(pop3_server in string,
pop3_usr in string,
pop3_pwd in string)
return varchar2
is language java name
'ReceiveMail.Receive(java.lang.String,
java.lang.String,
java.lang.String) return String';
And then trying to execute function receivemail, but I am getting following error.
SQL> set serveroutput on
SQL>
SQL> Declare
2 v_error_msg varchar2(10000);
3 Begin
4 v_error_msg:=receivemail('pop3.live.com', '<Hotmail email address>@hotmail.com', 'Hotmail password');
5 dbms_output.put_line(v_error_msg);
6 End;
7 /
javax.mail.AuthenticationFailedException: EOF on socket
PL/SQL procedure successfully completed.
SQL>
I am requesting, please help me to solve this problem.
I will be very thankful for your kind help and support.
Amol......Amol Karyakarte wrote:
I am requesting, please help me to solve this problem.
I will be very thankful for your kind help and support.
Amol......since you asked for it:
http://lmgtfy.com/?q=javax.mail.AuthenticationFailedException
First hit
Session session = Session.getDefaultInstance(props, null);Is null correct?
Regards -
AuthenticationFailedException : EOF on socket ERROR
Hi, there
i'm very upset because of this error
i'm finding out the solution
i'm about to make program to receive mails using pop3
my simple source can be compiled but has run-time error
please show me the solution
the error is like below
Exception in thread "main" javax.mail.AuthenticationFailedExcetion : EOF on socket
at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:118)
at javax.mail.Service.connect(Service.java:233)
at javax.mail.Service.connect(Service.java:134)
at MailReciever.recieve(MailReciever.java:48)
at MailReciever.main(MailReciever.java:344)Amol Karyakarte wrote:
I am requesting, please help me to solve this problem.
I will be very thankful for your kind help and support.
Amol......since you asked for it:
http://lmgtfy.com/?q=javax.mail.AuthenticationFailedException
First hit
Session session = Session.getDefaultInstance(props, null);Is null correct?
Regards -
Hi,
i've a java Mail program which will send the mail thro smtp server.
when i try to execute this program im getting the error javax.mail.MessagingException: [EOF]
i've attached both code & error.
while running the program need to give the arguments
ex : java SendMail smtpserver frommailid tomailid subject body
please provide me the solution.
import javax.mail.*;
import javax.mail.internet.*;
import java.util.*;
public class SendMail {
public static void main(String[] args) {
try
String smtpServer=args[0];
String to=args[1];
String from=args[2];
String subject=args[3];
String body=args[4];
send(smtpServer, to, from, subject, body);
catch (Exception ex)
System.out.println("Usage: java SendMail"
+" smtpServer toAddress fromAddress subjectText bodyText");
System.exit(0);
public static void send(String smtpServer, String to, String from
, String subject, String body)
try
Properties props = System.getProperties();
props.put("mail.smtp.host", smtpServer);
Session session = Session.getDefaultInstance(props, null);
Message msg = new MimeMessage(session);
msg.setFrom(new InternetAddress(from));
msg.setRecipients(Message.RecipientType.TO,InternetAddress.parse(to, false));
msg.setSubject(subject);
msg.setText(body);
msg.setSentDate(new Date());
System.out.println("test 1--");
Transport.send(msg);
System.out.println("test 2--");
System.out.println("Message sent OK.");
catch (Exception ex)
ex.printStackTrace();
thanks for the help in advance.
regs
lal.I ran into a similar error today. I fixed it by setting up SMTP authentication because my ISP's help pages said that they would allow only SMTP authentication.
Here is what I did:
Transport transport =
mailConnection.getTransport("smtp");
transport.connect(
"hostname", "email", "password");
Transport.send(msg);
I also passed the following property while creating the session:
props.put("mail.smtp.auth", "true");
finally turning on debug helped:
session.setDebug(true);
session.setDebugOut(null);
Hope this helps -
Exception in thread "main" javax.mail.MessagingException: [EOF]
hi i have a new Application which i need to send Email from it to people
i have tried the code in my university pc's and i works soo fine...but in my home
it gave my error
here is the code
import javax.mail.*;
import javax.mail.internet.*;
import java.util.*;
public class TestMail
public static void postMail( String recipients[ ], String subject, String message , String from) throws MessagingException
boolean debug = false;
//Set the host smtp address
Properties props = new Properties();
props.put("mail.smtp.host", "mx2.hotmail.com");
// create some properties and get the default Session
Session session = Session.getDefaultInstance(props, null);
session.setDebug(debug);
// create a message
Message msg = new MimeMessage(session);
// set the from and to address
InternetAddress addressFrom = new InternetAddress(from);
msg.setFrom(addressFrom);
InternetAddress[] addressTo = new InternetAddress[recipients.length];
for (int i = 0; i < recipients.length; i++)
addressTo[i] = new InternetAddress(recipients);
msg.setRecipients(Message.RecipientType.TO, addressTo);
// Optional : You can also set your custom headers in the Email if you Want
msg.addHeader("MyHeaderName", "myHeaderValue");
// Setting the Subject and Content Type
msg.setSubject(subject);
msg.setContent(message, "text/plain");
Transport.send(msg);
public static void main(String args[])throws MessagingException
String mailers[] = new String[1];
mailers[0] = "[email protected]";
postMail(mailers,"hello","hello my dear ay","[email protected]");
}and here is the output of the programe(the error)Exception in thread "main" javax.mail.MessagingException: [EOF]
at com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTransport.java:1481)
at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1
512)
at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1054)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:634)
at javax.mail.Transport.send0(Transport.java:189)
at javax.mail.Transport.send(Transport.java:118)
at TestMail.postMail(TestMail.java:39)
at TestMail.main(TestMail.java:45)
Press any key to continue . . .plz help meee
Edited by: mld on Dec 30, 2007 9:37 AM
Edited by: mld on Dec 31, 2007 2:32 AMi have tried every thing
i put stmp.bebug in my code and it gave me the following (tis is a part of the output...the other is not important)
DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
DEBUG: !anyLoaded
DEBUG: not loading resource: /META-INF/javamail.address.map
DEBUG: not loading file: C:\Program Files\Java\jdk1.5.0_06\jre\lib\javamail.addr
ess.map
DEBUG: java.io.FileNotFoundException: C:\Program Files\Java\jdk1.5.0_06\jre\lib\
javamail.address.map (The system cannot find the file specified)
Exception in thread "main" javax.mail.MessagingException: [EOF]
at com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTransport.java:1481)
at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1
512)
at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1054)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:634)
at javax.mail.Transport.send0(Transport.java:189)
at javax.mail.Transport.send(Transport.java:118)
at TestMail.postMail(TestMail.java:43)
at TestMail.main(TestMail.java:49)
Press any key to continue . . . -
How to solve this problem javax.mail.AuthenticationFailedException
i was used in this progrm my labtop means working correctly but instead of labtop i am using the desktop means following error is occuered can any one tell to me how to solve this problem.The erroe is **javax.mail.AuthenticationFailedException**
The coding is as followes
import javax.mail.*;
import javax.mail.internet.*;
import java.util.*;
public class Main
String d_email = "[email protected]",
d_password = "inst9",
d_host = "smtp.gmail.com",
d_port = "465",
m_to = "[email protected]",
m_subject = "Testing",
m_text = "Hey, this is the testing email.";
public Main()
Properties props = new Properties();
props.put("mail.smtp.user", d_email);
props.put("mail.smtp.host", d_host);
props.put("mail.smtp.port", d_port);
props.put("mail.smtp.starttls.enable","true");
props.put("mail.smtp.auth", "true");
//props.put("mail.smtp.debug", "true");
props.put("mail.smtp.socketFactory.port", d_port);
props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
props.put("mail.smtp.socketFactory.fallback", "false");
SecurityManager security = System.getSecurityManager();
try
Authenticator auth = new SMTPAuthenticator();
Session session = Session.getInstance(props, auth);
//session.setDebug(true);
MimeMessage msg = new MimeMessage(session);
msg.setText(m_text);
msg.setSubject(m_subject);
msg.setFrom(new InternetAddress(d_email));
msg.addRecipient(Message.RecipientType.TO, new InternetAddress(m_to));
Transport.send(msg);
catch (Exception mex)
mex.printStackTrace();
public static void main(String[] args)
Main blah = new Main();
private class SMTPAuthenticator extends javax.mail.Authenticator
public PasswordAuthentication getPasswordAuthentication()
return new PasswordAuthentication(d_email, d_password);
}yes that not a my password ...but the following erroer is occured ...
run-main:
javax.mail.AuthenticationFailedException
at javax.mail.Service.connect(Service.java:319)
at javax.mail.Service.connect(Service.java:169)
at javax.mail.Service.connect(Service.java:118)
at javax.mail.Transport.send0(Transport.java:188)
at javax.mail.Transport.send(Transport.java:118)
at Main.<init>(Main.java:41)
at Main.main(Main.java:51)
BUILD SUCCESSFUL (total time: 3 seconds)
I am using the netbeand 5.5 -
I bought an iPhone recently and since then I cannot get my email on my MacPro laptop…need help please
Good day colletteA11,
If you are having an issue with being unable to receive email on your MacBook Pro, I would suggest that you troubleshoot using the steps in this article -
Mail (Yosemite): If you can’t receive messages
Thanks for using Apple Support Communities.
Safe computing,
Brett L -
My daughter has spitefully changed my password and has refused to tell me. I have so much medical information that I can not lose. Is there anyway to get around this problem. Please I need Help fast.
Connect the iPod to your syncing computer and restore it via iTunes. However, if iTunes asks for the unknown passcode you need to place the iPod in recovery mode and then restore the iPod from backup. For recovey mode see:
iPhone and iPod touch: Unable to update or restore
"If you cannot remember the passcode, you will need to restore your device using the computer with which you last synced it. This allows you to reset your passcode and resync the data from the device (or restore from a backup). If you restore on a different computer that was never synced with the device, you will be able to unlock the device for use and remove the passcode, but your data will not be present. Refer to Updating and restoring iPhone and iPod touch software."
Above is from:
http://support.apple.com/kb/ht1212 -
Mail server not responding. Need help how to verify my account
Mail server not responding. Need help how to verify my account
There are instructions on this page for how to create a new account without giving credit card details (the instructions won't work with existing accounts) : http://support.apple.com/kb/HT2534
Unless an account is created via those instructions then credit card details will need to be entered on it before the account can be used. -
Hi. I'm a Mac user. After entering the redemption code from Adobe Photoshop CC, I keep getting an error saying "This card was purchased in a country that does not match your Adobe ID. You can try signing in with a different Adobe ID or get in touch with us if you need help." What should I do?
Did you purchase the software in another country than where you live?
-
Getting javax.mail.internet.ParseException when parsing MIME message
Hi All,
The MIME Content Type is as below.
Content-Type: application/pdf;
name="ecm-000669.pdf";
Content-Disposition: attachment;
filename="ecm-000669.pdf";
When executing the following statement
ContentType ct = new ContentType(contentType);
where contentType is application/pdf;
name="ecm-000669.pdf";
Getting the below error
javax.mail.internet.ParseException
at javax.mail.internet.ParameterList.<init>(ParameterList.java:61)
at javax.mail.internet.ContentType.<init>(ContentType.java:83)
at oracle.apps.fnd.wf.common.MIMEUtils.handleContent(MIMEUtils.java:488)
at oracle.apps.fnd.wf.mailer.EmailParser.processSingleContent(EmailParser.java:1851)
at oracle.apps.fnd.wf.mailer.EmailParser.parseBody(EmailParser.java:2166)
at oracle.apps.fnd.wf.mailer.EmailParser.parseEmail(EmailParser.java:1195)
at oracle.apps.fnd.wf.mailer.IMAPResponseHandler.processSingleMessage(IMAPResponseHandler.java:255)
at oracle.apps.fnd.wf.mailer.IMAPResponseHandler.processMessage(IMAPResponseHandler.java:92)
at oracle.apps.fnd.cp.gsc.SvcComponentProcessor.process(SvcComponentProcessor.java:659)
at oracle.apps.fnd.cp.gsc.Processor.run(Processor.java:283)
at java.lang.Thread.run(Thread.java:534)
The error is not happening when I remove the semi colon at the end of content-type header as shown below
Content-Type: application/pdf;
name="ecm-000669.pdf"
Can you please tell that semi colon at the end of Content-Type header is not supported in MIME standard? This MIME is coming from the rediff email client. Is there any parameter in Java Mail API to avoid these kind of issues?Yes, a trailing semicolon violates the MIME syntax spec.
You can work around this bug in the client by setting the System property "mail.mime.parameters.strict" to "false",
as described here: http://javamail.kenai.com/nonav/javadocs/javax/mail/internet/package-summary.html -
Package javax.mail does not exist. Please Help !
Hi all,
I am new to Java and I downloaded some sample application and when I try to compile it, I get an error:
"package javax.mail does not exist".
I've looked through forums and I know something is wrong with CLASSPATHS and that I also have to download the java mail package, but I dont know how to exactly fix this problem. I would appreciate very much if someone could help me, maybe by telling me the steps I need to take.
Thanks.Hey Rom,
Thanks for reply.
The sample application is an authentication module:
http://java.sun.com/j2se/1.4.2/docs/guide/security/jaas/tutorials/GeneralAcnOnly.html
But I think this doesnt really matter, as the error I get is because I have manually added the : import java.mail.*; statement. (Maybe I had to mention it in the previous post). Because I want to add some mail client inside.
I am compiling it using the command: javac, from the commandline menu. -
Mail not starting?? Need HELP PLEASE
Hi,
Everything has been working fine for the last few days until this evening when Mail just will not launch. If I go to Force Quit I see it stating that Mail is not responding.
Please can someone tell me what I need to do to get the mail working again? How can I reintall mail? Maybe it got corrupted?
ThanksJust to add.
If I click on the Mail icon to start it up and then do nothing for several minutes the messages that should show in the mailbox sometimes appear. Actually the message headers do but the content window just shows a "Loading" sign forever and never actually shows the contents??? -
My computer will not open Windows Vista.. I get a disc boot error. I have run a few diagnostics but need help to preceed. Have important files on the computer I need access to. Can anyone help walk me through the process? Thanks Also when I look at the check s that have been done it says something about a registry problem. HP Pavilion a 6863w
{Edited for privacy}Have you run a Hard Drive test in BIOS?
Jennifer P
I work for HP.
Please select the "Accept as Solution" button on the post that best answers your question. Also, you may select the "Kudos" button on any helpful post to give that person a quick thanks -
Javax.mail problem...can any1 help
Hi all;
me am using javamail version 1.3 to send simple text mail using smtp server...during compilation, no error arises but while running following exception arises;
Sending failed; nested exception is: javax.mail.SendFailedException: Invalid Addresses; nested exception is: javax.mail.SendFailedException: 550 5.7.1 ... Relaying denied ; nested exception is: javax.mail.SendFailedException: 550 5.7.1 ... Relaying denied ; nested exception is: javax.mail.SendFailedException: 550 5.7.1 ... Relaying denied
wat should i do...where does the problem lie...
would b waiting desperately for immediate replies.
Regardswhile executing the above mentioned code...following errors come out...
javax.mail.SendFailedException: Sending failed;
nested exception is:
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
javax.mail.SendFailedException: 550 5.7.1 <[email protected]>... Relaying denied
nested exception is:
javax.mail.SendFailedException: 550 5.7.1 <[email protected]>... Relaying denied
nested exception is:
javax.mail.SendFailedException: 550 5.7.1 <[email protected]>... Relaying denied
at javax.mail.Transport.send0(Transport.java:218)
at javax.mail.Transport.send(Transport.java:80)
at __27eayyaz._msgsend__jsp._jspService(/~ayyaz/msgsend.jsp:25)
at com.caucho.jsp.JavaPage.service(JavaPage.java:74)
at com.caucho.jsp.Page.subservice(Page.java:485)
at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:181)
at com.caucho.server.http.Invocation.service(Invocation.java:291)
at com.caucho.server.http.RunnerRequest.handleRequest(RunnerRequest.java:341)
at com.caucho.server.http.RunnerRequest.handleConnection(RunnerRequest.java:268)
at com.caucho.server.TcpConnection.run(TcpConnection.java:136)
at java.lang.Thread.run(Thread.java:544)
Maybe you are looking for
-
Making a swapped in image then swap an image
Ok, I've got my website all put together but I cannot for the life of me figure out how to do this next thing. I'm an illustrator so I have a website where the right hand side has thumbnails - those thumbnails swap an image to the main 'stage'. They
-
in this statement change merge to update plz help me MERGE INTO CORM_QWD_QUOTE_WUTASK A USING (SELECT * FROM CORM_QMD_QUOTEMAT) B ON ( ( A.QWD_ORDER_OU = B.QMD_ORDER_OU AND A.QWD_ORDER_NO = B.QMD_ORDER_NO AND A.QWD_AMEND_NO = B.QMD_AMEND_NO AND A.QWD
-
On opening the application Photoshop CC the following message appears Photoshop could not initialize because of a program error
-
Hi All, I am stuck with a problem of ADF TaskFlows and need a help quickly. The description is as follows. After login to the application first page i encounter is a jspx page say start.jspx on which i have dragged a bounded taskflow called as TF1. I
-
Thank you to anyone who might help me..... I have been a loyal HP customer for a long time, but this printer (Photosmart Premium c310a) has been a problem from the beginning. I am a painter who depends on crisp, clear prints. Now the error message o