Jmail problem

A

Al

I am writting a Servlet that will send emails. I have the following code in
my servlet. But the Servlet is throwing the Exception. The Exception says
that it Could not connect to SMTP host: pop.bigalsoftware.com . But I
currently have a perl CGI program that uses pop.bigalsoftware.com to send
mail. What am I doing wrong.

Thanks

Al

The code:
mailSession = Session.getDefaultInstance( props );
MimeMessage mimeMessage = new MimeMessage( mailSession );
mimeMessage.setText( message );

InternetAddress fromAddr = new InternetAddress( fromEmailAddr,
fromName );
mimeMessage.setFrom( fromAddr );

mimeMessage.addRecipients( Message.RecipientType.TO,
toEmailAddr );

mimeMessage.setSubject( subject );

Transport.send( mimeMessage );

The Exception:

javax.mail.MessagingException: Could not connect to SMTP host:
pop.bigalsoftware.com, port: 25, response: -1
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1201)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:311)
at javax.mail.Service.connect(Service.java:233)
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)
at com.bigalsoftware.util.MailUtil.sendMail(MailUtil.java:75)
 
G

GaryM

The Exception:

javax.mail.MessagingException: Could not connect to SMTP host:
pop.bigalsoftware.com, port: 25, response: -1


Do a mimeMessage.saveChanges() for sending. Put javamail in debug (add
key of "debug", value "true" to your Properties) and post the log here
if you still have not figured it out.

Regards,

Gary
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top