Email Problem in WebObjects
Email Problem in WebObjects
- Subject: Email Problem in WebObjects
- From: "DGanesh" <email@hidden>
- Date: Fri, 10 Mar 2006 17:14:42 +0530
- Importance: Normal
Hi folks,
I am using java mail api to send emails from WebObjects application.
But I am facing a small problem. The headers are getting displayed in
emails' body. for example here is the mail's body received by the recipient
when I send it from application.
Mime-Version: 1.0
Content-Type: text/html
Content-Transfer-Encoding: 7bit
Event Due Date:2006-03-10 18:29:58 Etc/GMT
Event Date: null
Priority : High
Event Time :null
When I tried the same code from simple java file Independent of
WebObjects) the recipient is receiving the mails properly as shown below...
Event Due Date:2006-03-10 18:29:58 Etc/GMT
Event Date: null
Priority : High
Event Time :null
here is the code I am using to send emails
Properties prop =System.getProperties();
prop.put("mail.smtp.host",host);
prop.put("mail.debug", "true");
javax.mail.Session ses1 =
javax.mail.Session.getDefaultInstance(prop,null);
MimeMessage message= new MimeMessage(ses1);
message.setFrom(new InternetAddress(cv_fromAddress));
message.addRecipient(Message.RecipientType.TO,new
InternetAddress(email));
message.setSubject(subject);
message.setText(emailBody);
Transport.send(message);
is there any thing I am doing wrong?
Thanks in advance,
Ganesh.
<<attachment: winmail.dat>>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden