S
schlagi123
Gast
Hallo liebe Leser,
ich habe ein paar probleme mit dem Versenden einer E-Mail, aber erstmal der Code:
Ausgabe und Exception:
Ich hoffe ihr könnt mir helfen ich bin schon ein bisschen am verzweifeln.
ich habe ein paar probleme mit dem Versenden einer E-Mail, aber erstmal der Code:
Java:
String host="mx.freenet.de";
int port=25;
String user="bassch";
String pass="****";
Properties props=new Properties();
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.starttls.enable", "true");
Session session=Session.getInstance(props);
session.setDebug(true);
Transport transport=session.getTransport("smtp");
transport.connect(host, port, user, pass); //<- HIER FLIEGT DIE EXCEPTION
Address[] addresses=InternetAddress.parse("bassch@freenet.de");
Message message=new MimeMessage(session);
message.setFrom(new InternetAddress(user));
message.setRecipients(Message.RecipientType.TO, addresses);
message.setSubject("TEST SUBJECT");
message.setText("text/plain BODY");
transport.sendMessage(message, addresses);
System.out.println("SEND");
transport.close();
Ausgabe und Exception:
Java:
DEBUG: setDebug: JavaMail version 1.4.5
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "mx.freenet.de", port 25, isSSL false
220 3.mx.freenet.de ESMTP Exim 4.76 Tue, 26 Jun 2012 22:01:56 +0200
DEBUG SMTP: connected to host "mx.freenet.de", port: 25
EHLO 192.168.1.10
550 Administrative prohibition
HELO 192.168.1.10
550 Administrative prohibition
Exception in thread "main" javax.mail.MessagingException: 550 Administrative prohibition
at com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTransport.java:2080)
at com.sun.mail.smtp.SMTPTransport.helo(SMTPTransport.java:1478)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:648)
at javax.mail.Service.connect(Service.java:295)
at de.schulten.bastian.jsgEditor3.plugin.emailControl.SendMailExample.main(SendMailExample.java:24)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Ich hoffe ihr könnt mir helfen ich bin schon ein bisschen am verzweifeln.
Zuletzt bearbeitet von einem Moderator: