• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

unidentified java error??

@

@n!e

Guest
#1
hi,
i've developed a chat application using java which i would like to link it together wit the email module. Basically, the email module itself has oredi has it's own .java sourcecodes & a main. Its also the same for my chat application.
At 1st, i've run my email module separately n it runs perfectly with no erros. But as i combined it together with the chat application, errors as below occurs. Can anyone out ther tell me what's wrong with it.
Thanks in advance.


C:\Documents and Settings\user\Desktop\fyp stuff\source\email\SMTP.java:74: cannot resolve symbol
symbol : variable RecipientType
location: class Message
msg.setRecipients(Message.RecipientType.TO,InternetAddress.parse(mc.To,false));
^
C:\Documents and Settings\user\Desktop\fyp stuff\source\email\SMTP.java:75: cannot resolve symbol
symbol : variable RecipientType
location: class Message
msg.setRecipients(Message.RecipientType.CC,
^
C:\Documents and Settings\user\Desktop\fyp stuff\source\email\SMTP.java:88: incompatible types
found : javax.mail.internet.MimeMessage
required: Message
Message msg = new MimeMessage(session);
^
C:\Documents and Settings\user\Desktop\fyp stuff\source\email\SMTP.java:89: cannot resolve symbol
symbol : method setText (java.lang.String)
location: class Message
msg.setText(mc.BodyText);
^
C:\Documents and Settings\user\Desktop\fyp stuff\source\email\SMTP.java:92: cannot resolve symbol
symbol : method setFrom (javax.mail.internet.InternetAddress)
location: class Message
msg.setFrom (new InternetAddress(mc.From));
^
C:\Documents and Settings\user\Desktop\fyp stuff\source\email\SMTP.java:95: cannot resolve symbol
symbol : variable RecipientType
location: class Message
msg.setRecipients(Message.RecipientType.TO,
^
C:\Documents and Settings\user\Desktop\fyp stuff\source\email\SMTP.java:97: cannot resolve symbol
symbol : variable RecipientType
location: class Message
msg.setRecipients(Message.RecipientType.CC,
^
C:\Documents and Settings\user\Desktop\fyp stuff\source\email\SMTP.java:99: cannot resolve symbol
symbol : method setHeader (java.lang.String,java.lang.String)
location: class Message
msg.setHeader("X-Mailer",MainData.progName);
^
C:\Documents and Settings\user\Desktop\fyp stuff\source\email\SMTP.java:100: cannot resolve symbol
symbol : method setSubject (java.lang.String)
location: class Message
msg.setSubject(mc.Subject);
^
C:\Documents and Settings\user\Desktop\fyp stuff\source\email\SMTP.java:101: cannot resolve symbol
symbol : method setSentDate (java.util.Date)
location: class Message
msg.setSentDate(new Date());
^
C:\Documents and Settings\user\Desktop\fyp stuff\source\email\SMTP.java:104: cannot resolve symbol
symbol : method send (Message)
location: class javax.mail.Transport
Transport.send(msg);
^
11 errors
Exit code: 1
There were errors:eek:
 
#2
Very simple.
1. The variable "msg" hasn't been declared anywhere.
2. The types "Message" and "MimeMessage" are not the same and incompatible (apparently).
 

Members online

Latest posts

Latest profile posts

Perris Calderon wrote on Electronic Punk's profile.
Ep, glad to see you come back and tidy up...did want to ask a one day favor, I want to enhance my resume , was hoping you could make me administrator for a day, if so, take me right off since I won't be here to do anything, and don't know the slightest about the board, but it would be nice putting "served administrator osnn", if can do, THANKS

Been running around Quora lately, luv it there https://tinyurl.com/ycpxl
Electronic Punk wrote on Perris Calderon's profile.
All good still mate?
Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,962
Messages
673,240
Members
89,017
Latest member
loxioalix