Não é mais possível fazer postagens ou usar assinaturas novas da Usenet nos Grupos do Google. O conteúdo histórico continua disponível.
Dismiss

Jmail problem

1 visualização
Pular para a primeira mensagem não lida

Al

não lida,
13 de mar. de 2005, 17:37:4713/03/2005
para

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)


GaryM

não lida,
14 de mar. de 2005, 17:26:1314/03/2005
para
"Al" <ajs...@optonline.net> wrote in news:dn3Zd.22022$Wn5.5952
@fe09.lga:

> 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

0 nova mensagem