L
Loek Raemakers
Mail-problem.
I want tot add a mailfunction to my java-application. The application runs on
an local nework.Students use it to sign up; the application places them in
groupes, and on lists/ waitinglists. I want to send them by mail these lists.
I use a Socket connection, from the local network to the mailserver.
Socket mysocket = new Socket("" + ipaddress,25,true);
I use the IP address and not the server name, supposing that there is no DNS.
public void MailerGroeps()
{
// Verstuurt de mail aan de hele groep;
// via een lus krijgen allen een mail.
// Let op wat precies in die lus staat.
// De body tekst bestaat uit: vast deel + getypt deel.
String recepient = "";
try
{
Socket outgoing = new Socket(host,portnum,true);
PrintStream ps = new PrintStream(outgoing.getOutputStream());
ps.println("HELO " + host);// "Polite people say helo"
ps.println("MAIL FROM: " + afzender);
........
This does not work.
It seems as if a direct socket connection is not possible.
Is that correct?
If so, is there an indirect way to establisch the connection and sending the
mail?
Thanks for any help.
I want tot add a mailfunction to my java-application. The application runs on
an local nework.Students use it to sign up; the application places them in
groupes, and on lists/ waitinglists. I want to send them by mail these lists.
I use a Socket connection, from the local network to the mailserver.
Socket mysocket = new Socket("" + ipaddress,25,true);
I use the IP address and not the server name, supposing that there is no DNS.
public void MailerGroeps()
{
// Verstuurt de mail aan de hele groep;
// via een lus krijgen allen een mail.
// Let op wat precies in die lus staat.
// De body tekst bestaat uit: vast deel + getypt deel.
String recepient = "";
try
{
Socket outgoing = new Socket(host,portnum,true);
PrintStream ps = new PrintStream(outgoing.getOutputStream());
ps.println("HELO " + host);// "Polite people say helo"
ps.println("MAIL FROM: " + afzender);
........
This does not work.
It seems as if a direct socket connection is not possible.
Is that correct?
If so, is there an indirect way to establisch the connection and sending the
mail?
Thanks for any help.