Java Mail - div. Probleme

y0dA

Erfahrenes Mitglied
Hi!

In meiner Applikation wird nach einem Formular Submit eine Mail abgeschickt, dazu benütze ich JavaMail und bei mir lokal funktioniert alles ohne Probleme. Wenn ich nun auf unseren INODE Server deploye kann ich leider keine Mails mehr versenden, da ich div. Exceptions bekomme.

Detail:

Code:
			 Properties properties = new Properties();
			 
			 /* add server address to properties */
			 properties.put(SendMailController.SMTP_HOST, model.getSmtpHost());
	    
			 /* set port */
			 properties.put(SendMailController.SMTP_PORT, model.getPort());
			 			 
			 /* create session without authentification */
			 Session session = Session.getDefaultInstance(properties); 
			 
			 
			 try {
				 /* create message */
				 Message msg = new MimeMessage(session);

				 /* set from */
				 msg.setFrom(new InternetAddress(model.getSenderAddress()));
				
				 /* set to */
				 msg.setRecipients(Message.RecipientType.TO,
						 InternetAddress.parse(SendMailController.formatRecipient(model.getRecipientsAddressList()),
								 false));
				 
				 /* set cc */
				 msg.setRecipients(Message.RecipientType.CC,
						 InternetAddress.parse(SendMailController.formatRecipient(model.getCcAddressList()),
								 false));
				 
				 /* set bcc */
				 msg.setRecipients(Message.RecipientType.BCC,
						 InternetAddress.parse(SendMailController.formatRecipient(model.getBccAddressList()),
								 false));
				
				 /* overwork and set subject */
				 msg.setSubject(SendMailController.overworkSubject(model.getSubject(), contractName, address, dbk));
				
				 /* overwork and set text */
				 msg.setText(SendMailController.overworkText(model.getText(), formModel,
						 model.getRecipientsAddressList(), classification));	 

				 /* add header information */
				 //FIXME benötigt? oder löschen?
				 msg.setHeader(SendMailController.HEADER_INFORMATION_SUBJECT, model.getSubject());
				 msg.setSentDate(new Date());

				 /* log info */
				 SendMailController.LOGGER.info("send Message. class: SendMailController method: sendMail");

				 /* send email */
				 Transport.send(msg);

Die div. Daten werden aus einem Property File gelesen:
Code:
portDefault=25
senderAddress=meine emailadresse von chello
#smtpHost=smtp.inode.at smtp für inode
smtpHost=mgate.chello.at
subject=Text für Subject
text=Blah Blah

Nun bin ich wirklich ratlos weshalb der Spass am INODE Rechner nicht funktioniert - zunächst hatte ich den smtp "mgate.chello.at" ausprobiert.
-->
Code:
2007-07-02 15:38:13,484 ERROR [http-8080-Processor25] controller.SendMailController (SendMailController.java:283) - class: SendMailController method: sendMail, problem occurred while try to send email: javax.mail.SendFailedException: Invalid Addresses;
  nested exception is:
	class com.sun.mail.smtp.SMTPAddressFailedException: 550 relaying mail to snail-mail.net is not allowed
lokal funktioniert es (habe es auch mit aon.at etc probiert)

Danach habe ich den INODE smtp probiert:
Code:
2007-07-02 16:35:06,578 ERROR [http-8080-Processor24] controller.SendMailController (SendMailController.java:281) - class: SendMailController method: sendMail, problem occurred while try to send email: javax.mail.MessagingException: Unknown SMTP host: smtp.inode.at smtp für falkenstein/inode;
  nested exception is:
	java.net.UnknownHostException: smtp.inode.at smtp für falkenstein/inode

Zum Thema Authentifizierung:
Für den Chello SMTP habe ich es schon mit Authentifizierung probiert und klappt auch wunderbar, für INODE hab ich nichts um mich zu authentifizieren...
Weiters kann mein Kollege ohne Authentifizierung den SMTP Host benützen (ist aber .NET sowie nicht am INODE Rechner selbst gewesen).

Weiß jemand Rat?

mfg
 
Argh
Hat sich erledigt, ich hatte im Property File ein Kommentar neben dem smtp stehen, welches er dann miteingelesen hatte.
 

Neue Beiträge

Zurück