I'm going through a tutorial for the JavaMail API and I'm told
to enter the name of my SMTP Server. How do I know the name of
my SMTP server? I'm using Microsoft Outlook...
--> Posted via http://www.javaquestionbank.com <--
C:\javamail-1.2\demo>java msgsend -o from@adress -M SMTP.Server
to@adress
To: to@adress
Subject: Test
Test Message Here
^Z
javax.mail.SendFailedException: Sending failed;
nested exception is:
javax.mail.MessagingException: Unknown SMTP host:
SMTP.Server;
nested exception is:
java.net.UnknownHostException: SMTP.Server
at javax.mail.Transport.send0(Transport.java:219)
at javax.mail.Transport.send(Transport.java:81)
at msgsend.<init>(msgsend.java:162)
at msgsend.main(msgsend.java:52)
for SMTP.Server, I tried:
SMTP.XCH-STL-10
XCH-STL-10
neither one works... do I need to add the IP address for my
computer or something along those lines? the problem shouldn't
be the code because this is a demo provided by sun...
"buttercup21" <buttercup...@sun.partner.remarq.com.invalid> wrote in
message news:00000171...@usw-ex0107-167.remarq.com...
C:\javamail-1.2\demo>java msgsend -o myaddress.com -M
144.117.115.110 myaddress.com
To: katie.a....@boeing.com
Subject: test
this is a test
^Z
javax.mail.SendFailedException: Sending failed;
nested exception is:
javax.mail.MessagingException: Could not connect to SMTP
host: 144.117.115.110, po
rt: 25;
nested exception is:
java.net.ConnectException: Connection refused: no further
information
at javax.mail.Transport.send0(Transport.java:219)
at javax.mail.Transport.send(Transport.java:81)
at msgsend.<init>(msgsend.java:162)
at msgsend.main(msgsend.java:52)
??? At least it now finds the host, even though I can't
connect...
Any ideas?
Try connecting to port 25 with telnet:
telnet 144.117.115.110 25
If it won't connect, then that server isn't really an SMTP
server, no matter what your ISP or IT department may have told
you.
Either that, or there might be some kind of firewall preventing
you from getting through.
Whoever runs your network will need to provide you with a local
SMTP server that you can connect to for development purposes.
Tell then that you can't do your job without it.