Problem sending SMTP mail with JavaMail
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Friday, September 21, 2001 05:00 AM

When I try to send a mail using a smtp server i don't get any exceptions but the message does not reach the reciever. Below is the SMTP debug text that is written. I can't see whats wrong. DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc] DEBUG SMTP: useEhlo true, useAuth false DEBUG: SMTPTransport trying to connect to host "62.119.41.165", port 25 DEBUG SMTP RCVD: 220 bfexchange01.bluefactory.com ESMTP Server (Microsoft Exchange Internet Mail Service 5.5.2653.13) ready DEBUG: SMTPTransport connected to host "62.119.41.165", port: 25 DEBUG SMTP SENT: EHLO KMKWSPSTH DEBUG SMTP RC   More>>

When I try to send a mail using a smtp server i don't get any exceptions but the message does not reach the reciever. Below is the SMTP debug text that is written. I can't see whats wrong.


DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]

DEBUG SMTP: useEhlo true, useAuth false

DEBUG: SMTPTransport trying to connect to host "62.119.41.165", port 25

DEBUG SMTP RCVD: 220 bfexchange01.bluefactory.com ESMTP Server (Microsoft Exchange Internet Mail Service 5.5.2653.13) ready

DEBUG: SMTPTransport connected to host "62.119.41.165", port: 25

DEBUG SMTP SENT: EHLO KMKWSPSTH

DEBUG SMTP RCVD: 250-bfexchange01.bluefactory.com Hello [KMKWSPSTH]

250-XEXCH50

250-HELP

250-ETRN

250-DSN

250-SIZE 0

250-AUTH LOGIN

250 AUTH=LOGIN

DEBUG SMTP Found extension "XEXCH50", arg ""

DEBUG SMTP Found extension "HELP", arg ""

DEBUG SMTP Found extension "ETRN", arg ""

DEBUG SMTP Found extension "DSN", arg ""

DEBUG SMTP Found extension "SIZE", arg "0"

DEBUG SMTP Found extension "AUTH", arg "LOGIN"

DEBUG SMTP Found extension "AUTH=LOGIN", arg ""

DEBUG SMTP: use8bit false

DEBUG SMTP SENT: MAIL
FROM:

DEBUG SMTP RCVD: 250 OK - mail from

DEBUG SMTP SENT: RCPT TO:

DEBUG SMTP RCVD: 250 OK - Recipient

Verified Addresses
kerstin.mork@ausystem.se

DEBUG SMTP SENT: DATA

DEBUG SMTP RCVD: 354 Send data. End with CRLF.CRLF

DEBUG SMTP SENT:

.

DEBUG SMTP RCVD: 250 OK

DEBUG SMTP SENT: QUIT

   <<Less

Re: Problem sending SMTP mail with JavaMail

Posted By:   khurram_shahzad  
Posted On:   Monday, September 24, 2001 03:33 PM

Here is complete program for sending mail.

import javax.mail.*;
import javax.mail.internet.*;
import java.util.*;
public class Assimilator{
public static void main(String s[]){
try{
Properties props = new Properties();
props.put("mail.host","mail.mycgiserver.com");
Session mailConnection = Session.getInstance(props,null);
// null is used in place of PasswordAuthentication object since for sending mail there is no need of password authentication
Message msg = new MimeMessage(mailConnection);
Address min2 = new InternetAddress("khurram_min2@hotmail.com","Khurram Shahzad");
Address min2great = new InternetAddress("min2great@hotmail.com","Khurram Shahzad");
msg.setContent("Hellow Khurram!
This mail is being sent by Khurram from his own mail assimulator. Is't it nice.This is from mycgiserver.com From: Khurram","text/plain");
msg.setFrom(min2);
msg.setRecipient(Message.RecipientType.TO,min2great);
msg.setSubject("Again Well Done Khurram");
Transport.send(msg);
}catch(Exception e){e.printStackTrace();}

}
}

Re: Problem sending SMTP mail with JavaMail

Posted By:   fernando_fernandes  
Posted On:   Friday, September 21, 2001 01:31 PM

maybe some problem with your smtp server. Try to use some other smtp server from a public webmail. If it works you will know!
About | Sitemap | Contact