How do I remove mail header from the Java Mail?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Nagaraju_K
Posted On:   Tuesday, July 17, 2001 04:45 PM

Hi, I have a problem with sending the mail with out mail header. When I don't set any header also it's giving in the my mail body. Here is the example mail I got from my java mail. =================================== Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello World Raju! ==================================== I have a problem with removing the Mime-version: 1.0 and all the content type info. Can any one know what part I am missing to take out this header. Please help me. Thanks in advance.   More>>

Hi,

I have a problem with sending the mail with out mail header.

When I don't set any header also it's giving in the my mail body.

Here is the example mail I got from my java mail.

===================================
Mime-Version: 1.0

Content-Type: text/plain; charset=us-ascii

Content-Transfer-Encoding: 7bit


Hello World Raju!

====================================


I have a problem with removing the Mime-version: 1.0 and all the content type info.

Can any one know what part I am missing to take out this header.

Please help me.


Thanks in advance.

Raju


Here is the java code I was using to send the mail.

// create a message
Message msgg = new MimeMessage(session);

// set the from and to address
InternetAddress addressFrom = new InternetAddress(from);

msgg.setFrom(addressFrom);

InternetAddress addressTo = new InternetAddress(to);

msgg.setRecipients(Message.RecipientType.TO, new InternetAddress[] {addressTo});


// Setting the Subject and Content Type
msgg.setSubject(subject);

//msgg.setContent(message, "text/plain");

msgg.setText(message);

Transport.send(msgg);

   <<Less
About | Sitemap | Contact