on 08-24-2007 10:26 AM
Hi Experts,
I am getting following error message while compiling Web Dynpro program. The erring lines are as below:
Message message = new MimeMessage(session);
try {
message.setFrom(new InternetAddress(fromMailId));
message.addRecipient(
Message.RecipientType.TO,
new InternetAddress(toMailId));
message.setSubject(mailSubject);
message.setText(mailBody);
message.setHeader("X-Mailer", "E-Mail");
message.setSentDate(new Date());
Transport.send(message);
The error messages are:
Message.ReceipientType can not be resolved
The method send(Message) is undefined for the type Transport
The method setFrom(InternetAddress) is undefined for the type Message
The method setHeader(String, String) is undefined for the type MessageThe method setSentDate(Date) is undefined for the type Message
The method setSubject(String) is undefined for the type Message
The method setText(String) is undefined for the type Message
Type mismatch: cannot convert from MimeMessage to Message
Can you please help me in resolving the issue. It seems that some API is missing. I believe if some one can tell me the name of JAR file / API then I will be able to sort out the issue. I will add these JAR file in my program.
Thanks,
S
Hi Stuart,
Please check the blog below which explains similar scenario.
/people/sap.user72/blog/2005/06/08/sending-attachments-in-mails
Here Noufal gave an example of sending a mail with attachment, whereas you are trying to send the mail without attachment.
He has stated the jar files required for the code and also the path involved. Please include the same.
Hope this helps.
Regards,
Rekha Malavathu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.