Hello everyone,
I am stuck with this problem for a week now, and I am desperately in need of
your help. Here is my code: I can't seem to get the "Cc" line working
correctly.
It keeps appearing in the body of the email instead of being on the "Cc"
line.
Please see my screen-shot below and my code. Thank you.
<<...>>
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
import java.util.*;
import java.net.URL;
import java.util.Date;
import java.util.Hashtable;
import java.lang.Runtime;
import java.sql.ResultSet;
import oracle.jdbc.driver.*;
//import SMTP Class; used for setting email
import javax.mail.*;
import javax.mail.internet.*;
import java.text.*;
//Create the JavaMail session
Properties properties = System.getProperties();
properties.put("mail.filenet.com","hq-expo1");
Session session = Session.getInstance(properties,null);
//Construct the message
MimeMessage message = new MimeMessage(session);
//Set the from address
mailFrom = "lib";
//Address fromAddress = new InternetAddress(mailFrom);
message.setFrom(new InternetAddress(mailFrom));
message.setRecipients(Message.RecipientType.TO,InternetAddress.parse
(mailTo));
message.setRecipients(Message.RecipientType.CC,InternetAddress.parse
(final_sqappr));
//Set the subject and text
message.setSubject(mailSubject);
message.setText(reason1);
//Send the message
Transport.send(message);
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html