Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2005

Tip: Looking for answers? Try searching our database.

java mail authentication via MS Exchange 2003

Thread view: 
lemonj@gmail.com - 21 Jun 2005 17:13 GMT
Hi,

can anyone post a code for sending mail using Exchange 2003 and
javamial (1.3.2). I am getting authentication error but I know the user
and passoword are correct (i can base64 them and log via telnet ). Is
it just constructing correctly the user name or need to configure the
server ?

here is a snip from a working code with qmail server

props.put("mail.smtp.host", "mail");
props.put("mail.smtp.port", "25");
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.user", "smtp_cuser");
props.put("mail.smtp.password", "passwd");
props.put("mail.smtp.connectiontimeout", "10000");
Session session = Session.getDefaultInstance(props);

Thanks for responses.
gimme_this_gimme_that@yahoo.com - 21 Jun 2005 18:32 GMT
I've had trouble sending emails using Outlook in my sandbox
because our NT sys admin likes to keep IMAP turned off
for security reasons.

I use exim (and renamed it sendmail) to send mails.
Then again, I use cygwin.
GaryM - 21 Jun 2005 21:00 GMT
lemonj@gmail.com wrote in news:1119370396.590571.171530
@o13g2000cwo.googlegroups.com:

> Thanks for responses.

Put it in debug mode and you'll get a better idea of what is going
wrong.
lemonj@gmail.com - 22 Jun 2005 07:33 GMT
I had it in debug mode

---

DEBUG: getProvider() returning
javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun
Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth true
Exception in thread "main" javax.mail.AuthenticationFailedException
    at javax.mail.Service.connect(Service.java:264)
    at javax.mail.Service.connect(Service.java:134)
    at javax.mail.Service.connect(Service.java:86)
    at com.sun.mail.smtp.SMTPTransport.connect(SMTPTransport.java:144)
    at javax.mail.Transport.send0(Transport.java:150)
    at javax.mail.Transport.send(Transport.java:80)

> lemonj@gmail.com wrote in news:1119370396.590571.171530
> @o13g2000cwo.googlegroups.com:
[quoted text clipped - 3 lines]
> Put it in debug mode and you'll get a better idea of what is going
> wrong.
GaryM - 22 Jun 2005 13:57 GMT
> DEBUG: getProvider() returning
> javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,
[quoted text clipped - 9 lines]
>      ) at javax.mail.Transport.send0(Transport.java:150)
>      at javax.mail.Transport.send(Transport.java:80)

Strange. I don't see your program in the stack. Can you post the rest
of your code.
GaryM - 22 Jun 2005 13:57 GMT
> DEBUG: getProvider() returning
> javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,
[quoted text clipped - 9 lines]
>      ) at javax.mail.Transport.send0(Transport.java:150)
>      at javax.mail.Transport.send(Transport.java:80)

Strange. I don't see your program in the stack. Can you post the rest
of your code.
GaryM - 22 Jun 2005 13:57 GMT
> DEBUG: getProvider() returning
> javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,
[quoted text clipped - 9 lines]
>      ) at javax.mail.Transport.send0(Transport.java:150)
>      at javax.mail.Transport.send(Transport.java:80)

Strange. I don't see your program in the stack. Can you post the rest
of your code.
GaryM - 22 Jun 2005 13:57 GMT
> DEBUG: getProvider() returning
> javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,
[quoted text clipped - 9 lines]
>      ) at javax.mail.Transport.send0(Transport.java:150)
>      at javax.mail.Transport.send(Transport.java:80)

Strange. I don't see your program in the stack. Can you post the rest
of your code.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.