Javax.mail attachment not correctly encoded

Hi,
I have developed an online auction system which, has a function to generate invoices using the iText libraries.
The invoices are stored as a ByteArray in a database and are mailed to the customer. This works find when running
the application within my IDE (Netbeans) on Mac OS X and Apache Tomcat 6.0.29 and javamail 1.4.3. When running the application on
Windows 2003 Server with same tomcat and javamail version the attachment is not readable on the client.
The attachment is added to the e-mail using the following code;
// Part two is the attachment
messageBodyPart = new MimeBodyPart();
messageBodyPart.setFileName(attName) ;
messageBodyPart.setDataHandler(new DataHandler(new ByteArrayDataSource(attachment,attContType)));
multipart.addBodyPart(messageBodyPart) ;
The raw e-mail of the attachment when it is correctly encoded (running from my IDE)
Content-Type: application/pdf; name=factuur_656.pdf
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=factuur_656.pdf
JVBERi0xLjQKJeLjz9MKNCAwIG9iago8PC9MZW5ndGggMzM2L0ZpbHRlci9GbGF0ZURlY29kZT4+
c3RyZWFtCnicjZPBboJAEIbvPMXcbBPEmd1lWXpr0/bWpFYOvTWoa0WQVUQPPfmofZQuaFGCNg0J
gfDtfP+fCWvnIXK4BIUSoqnzFDlDZw0EaK/DfbKEwfuM4NHAsIIHzwQkIJo5vxQJCTIIIFo6Nztd
pGYyLz8QUfryNlo0GA+owSjsE/UZEp4TPp4IpAFS9bHr4wi+UjVllpvJvEgWuyT/bLlk4KFqsDqV
WcHKopu2MfTUiUvNptT5wcouWCWrsbgok1RnIIUL0Hvbjse60DlkcVx86bx3LhCoPN4c3AMjF9ud
SdZJG8IC/vUEQnUTjF5GcJ/pooRDfuBgAyV2C/b5G/aALl10HodVAMfrTi7aTr9q/Vq9LsBspxrG
And again when encoded from the server
Content-Type: application/pdf; name=factuur_656.pdf
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=factuur_656.pdf
JVBERi0xLjQKJeLjz9MKNCAwIG9iago8PC9MZW5ndGggMzM2L0ZpbHRlci9GbGF0ZURlY29kZT4+
c3RyZWFtCnicP5PBboJAEIbvPMXcbBPEmd1lWXpr0/bWpFYOvTWoa0U/VUQPPfmofZQuaFGCNg0J
P/DtfP+fCWvnIXK4BIUSoqnzFDlDZw0EaK/DfbKEwfuM4NHAsIIHzwQkIJo5vxQJCTIIIFo6Nztd
pGYyLz8QUfryNlo0GA+owSjsE/UZEp4TPp4IpAFS9bHr4wi+UjVllpvJvEgWuyT/bLlk4KFqsDqV
WcHKopu2MfTUiUvNptT5wcouWCWrsbgok1RnIIUL0Hvbjse60DlkcVx86bx3LhCoPN4c3AMjF9s/
SdZJG8IC/vUEQnUTjF5GcJ/pooRDfuBgAyV2C/b5G/aALl10HodVAMfrTi7aTr9q/Vq9LsBspxrG
Both attachments have the same length, and are similar (but are exactly the same).
In the third line of the correctly encoded attachment the characters are; "gf" which are
encoded in the not correctly encoded attachment to "P/".
Also setting "-Dmail.mime.multipart.bmparse=false" did not make any difference.
Any ideas, suggestions, solutions ?
Cheers
Peter

Have you verified that the input byte array has the same contents in both cases?
Is it possible that your server is picking up a different version of JavaMail?

Similar Messages

  • Package javax.mail does not exist (Still having trouble)

    Good Morning
    I know that there are several posts regarding issues with javamail. I have viewed them for the past hour. While several of them address my issue I have been unable to locate a solution.
    Bare with me please, I am making this post very thorough. The other threads I have read are frusterating because the problems people tend to post are not clear.
    I am trying to run "msgsend" which is a provided demo of javamail-1.4 using command prompt (start - run - cmd) with the javac command.
    The output below is directly pasted from command prompt and written in bold.
    C:\download\javamail-1.4\demo>javac msgsend.java
    C:\download\javamail-1.4\demo>javac msgsend.java
    msgsend.java:44: package javax.mail does not exist
    import javax.mail.*;
    ^
    msgsend.java:45: package javax.mail.internet does not exist
    import javax.mail.internet.*;
    ^
    msgsend.java:140: cannot find symbol
    symbol : class Session
    location: class msgsend
    Session session = Session.getInstance(props, null);
    ^
    msgsend.java:140: cannot find symbol
    symbol : variable Session
    location: class msgsend
    Session session = Session.getInstance(props, null);
    ^
    msgsend.java:145: cannot find symbol
    symbol : class Message
    location: class msgsend
    Message msg = new MimeMessage(session);
    ^
    msgsend.java:145: cannot find symbol
    symbol : class MimeMessage
    location: class msgsend
    Message msg = new MimeMessage(session);
    ^
    msgsend.java:147: cannot find symbol
    symbol : class InternetAddress
    location: class msgsend
    msg.setFrom(new InternetAddress(from));
    ^
    msgsend.java:151: package Message does not exist
    msg.setRecipients(Message.RecipientType.TO,
    ^
    msgsend.java:152: cannot find symbol
    symbol : variable InternetAddress
    location: class msgsend
    InternetAddress.parse(to,
    ^
    msgsend.java:154: package Message does not exist
    msg.setRecipients(Message.RecipientType.CC,
    ^
    msgsend.java:155: cannot find symbol
    symbol : variable InternetAddress
    location: class msgsend
    InternetAddress.parse(cc,
    ^
    msgsend.java:157: package Message does not exist
    msg.setRecipients(Message.RecipientType.BCC,
    ^
    msgsend.java:158: cannot find symbol
    symbol : variable InternetAddress
    location: class msgsend
    InternetAddress.parse(bcc,
    ^
    msgsend.java:167: cannot find symbol
    symbol : class MimeBodyPart
    location: class msgsend
    MimeBodyPart mbp1 = new MimeBodyPart();
    ^
    msgsend.java:167: cannot find symbol
    symbol : class MimeBodyPart
    location: class msgsend
    MimeBodyPart mbp1 = new MimeBodyPart();
    ^
    msgsend.java:169: cannot find symbol
    symbol : class MimeBodyPart
    location: class msgsend
    MimeBodyPart mbp2 = new MimeBodyPart();
    ^
    msgsend.java:169: cannot find symbol
    symbol : class MimeBodyPart
    location: class msgsend
    MimeBodyPart mbp2 = new MimeBodyPart();
    ^
    msgsend.java:171: cannot find symbol
    symbol : class MimeMultipart
    location: class msgsend
    MimeMultipart mp = new MimeMultipart();
    ^
    msgsend.java:171: cannot find symbol
    symbol : class MimeMultipart
    location: class msgsend
    MimeMultipart mp = new MimeMultipart();
    ^
    msgsend.java:185: cannot find symbol
    symbol : variable Transport
    location: class msgsend
    Transport.send(msg);
    ^
    msgsend.java:193: cannot find symbol
    symbol : class Store
    location: class msgsend
    Store store = null;
    ^
    msgsend.java:195: cannot find symbol
    symbol : class URLName
    location: class msgsend
    URLName urln = new URLName(url);
    ^
    msgsend.java:195: cannot find symbol
    symbol : class URLName
    location: class msgsend
    URLName urln = new URLName(url);
    ^
    msgsend.java:212: cannot find symbol
    symbol : class Folder
    location: class msgsend
    Folder folder = store.getFolder(record);
    ^
    msgsend.java:218: cannot find symbol
    symbol : variable Folder
    location: class msgsend
    folder.create(Folder.HOLDS_MESSAGES);
    ^
    msgsend.java:220: cannot find symbol
    symbol : class Message
    location: class msgsend
    Message[] msgs = new Message[1];
    ^
    msgsend.java:220: cannot find symbol
    symbol : class Message
    location: class msgsend
    Message[] msgs = new Message[1];
    27 errors
    Here are the methods I have tried...
    1. Make sure you have most current version of Java
    2. Reinstall Java
    3. Attempt to compile in an IDE (Attempted in Eclipse 3.2)
    4. Set class path
    Some sources suggest "CLASSPATH" some suggest "CLASS PATH" as the variable name. I have tried both.
    Below is what the classpath looks like in bold.
    Variable Name: CLASS PATH
    Variable value: c:\download\javamail-1.4\mail.jar;C:\download\jaf-1.1\activation.jar;.
    I have double checked all folder names and copy pasted all entries to eliminate typos. Javamail-1.4 and jaf-1.1 are both located in c:\download which is the same location Class Path points to.
    Thank you very much for your input and effort. I can imagine how frusterating it is responding to 20million javamail posts :) (that may be a bit of an overstatement!)
    Thank you again!
    Irbi
    Message was edited by:
    irbi
    Message was edited by:
    irbi

    Yes - I have read that part of the README and did exactly as it has said in a previous attempt. I should have mentioned that here I'm sorry :)
    I moved the .jar files into the download folder and set the classpath exactly as the readme shows.
    When I do that the msgsend.java compiles correctly but it still does not run.
    Below is what happens.
    C:\download\javamail-1.4\demo>set CLASSPATH=%CLASSPATH%;c:\download\javamail-1.4
    \mail.jar;%CLASSPATH%;c:\download\jaf-1.1\activation.jar.
    C:\download\javamail-1.4\demo>javac msgsend.java
    C:\download\javamail-1.4\demo>java msgsend.java
    Exception in thread "main" java.lang.NoClassDefFoundError: msgsend/java
    C:\download\javamail-1.4\demo>
    I have tried fixing this error as well via forums and FAQs but it seems to be the most generic error.
    One suggestion was to clear your classpath. I tried this with a test hello world program which was giving the same error - "NoClassDefFoundError". By clearing the classpath I was able to get the hello world program to run without this error. But I can't just clear the classpath in this instance because it needs to point to mail.jar and activation.jar for the program to compile.
    Thanks again for all of your efforts. You are more appreciated than you know.

  • Javax.mail does not exist

    I would like to thank warnerja for your advise about the classpath.
    Thanks for the classpath information regarding the .jar files. Now when I start tomcat cat it runs appropriately. However I am still having a problem when i try to compile the message send demo. The message I get is javax.mail does not exist,(import javax.mail.) when I downloade the mail api I placed on the root of my D drive and i placed the mail and activation jar files in my lib folded of my Jakarta-3.2.1 lib folder. I graduated Chubb Institute back in october and am currently still looking for work so my memory but be a little fuzzy as to whether or not this is correct. Your help is greatly appreciated.

    If you are just compiling the classes then you should check that the mail.jar file is in your compiler classpath. How you check and set it depends on how you are compiling it and on what system etc.

  • Error: Javax.mail does not exist, please help

    I have copies mail.jar and activation.jar in the classpath directory as instructed, then try to compile but got the below error: package javax.mail does not exist
    please help.
    G:\CRD>javac SendMailBean.java
    SendMailBean.java:22: package javax.mail does not exist
    import javax.mail.*; //JavaMail packages
    ^
    SendMailBean.java:23: package javax.mail.internet does not exist
    import javax.mail.internet.*; //JavaMail Internet packages
    ^
    SendMailBean.java:43: cannot resolve symbol
    symbol : class Session
    location: class SendMailBean
    Session l_session = Session.getDefaultInstance(l_props, null);
    ^
    SendMailBean.java:43: cannot resolve symbol
    symbol : variable Session
    location: class SendMailBean
    Session l_session = Session.getDefaultInstance(l_props, null);
    ^
    SendMailBean.java:48: cannot resolve symbol
    symbol : class MimeMessage
    location: class SendMailBean
    MimeMessage l_msg = new MimeMessage(l_session); // Create a New message
    ^
    SendMailBean.java:48: cannot resolve symbol
    symbol : class MimeMessage
    location: class SendMailBean
    MimeMessage l_msg = new MimeMessage(l_session); // Create a New message
    ^
    SendMailBean.java:50: cannot resolve symbol
    symbol : class InternetAddress
    location: class SendMailBean
    l_msg.setFrom(new InternetAddress(p_from)); // Set the From address
    ^
    SendMailBean.java:53: package Message does not exist
    l_msg.setRecipients(Message.RecipientType.TO,
    ^
    SendMailBean.java:54: cannot resolve symbol
    symbol : variable InternetAddress
    location: class SendMailBean
    InternetAddress.parse(p_to, false));
    ^
    SendMailBean.java:57: package Message does not exist
    l_msg.setRecipients(Message.RecipientType.CC,
    ^
    SendMailBean.java:58: cannot resolve symbol
    symbol : variable InternetAddress
    location: class SendMailBean
    InternetAddress.parse(p_cc, false));
    ^
    SendMailBean.java:62: package Message does not exist
    l_msg.setRecipients(Message.RecipientType.BCC,
    ^
    SendMailBean.java:63: cannot resolve symbol
    symbol : variable InternetAddress
    location: class SendMailBean
    InternetAddress.parse(p_bcc, false));
    ^
    SendMailBean.java:68: cannot resolve symbol
    symbol : class MimeBodyPart
    location: class SendMailBean
    MimeBodyPart l_mbp = new MimeBodyPart();
    ^
    SendMailBean.java:68: cannot resolve symbol
    symbol : class MimeBodyPart
    location: class SendMailBean
    MimeBodyPart l_mbp = new MimeBodyPart();
    ^
    SendMailBean.java:72: cannot resolve symbol
    symbol : class Multipart
    location: class SendMailBean
    Multipart l_mp = new MimeMultipart();
    ^
    SendMailBean.java:72: cannot resolve symbol
    symbol : class MimeMultipart
    location: class SendMailBean
    Multipart l_mp = new MimeMultipart();
    ^
    SendMailBean.java:83: cannot resolve symbol
    symbol : variable Transport
    location: class SendMailBean
    Transport.send(l_msg);
    ^
    SendMailBean.java:98: cannot resolve symbol
    symbol : class MessagingException
    location: class SendMailBean
    } catch (MessagingException mex) { // Trap the MessagingException Error
    ^
    19 errors

    Another person who doesn't understand how to set CLASSPATH.
    Move those JARs into the same directory as your SendMailBean.java and do it like this:
    javac -classpath .;mail.jar;activation.jar -d . *.java
    java -classpath .;mail.jar;activation.jar SendMailBeanRead how to set CLASSPATH properly:
    http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/classpath.html

  • Javax.mail.MessagingException: Not Connected

    Hi All,
    I am trying to read the message from pop.gmail.com using JavaMail API.I ma using POP3 protocol for it.
    But I got the following Exception
    javax.mail.MessagingException: Not Connected
    at com.sun.mail.pop3.POP3Store.checkConnected(POP3Store.java:279)
         at com.sun.mail.pop3.POP3Store.getFolder(POP3Store.java:261)
         at MailReceipt.connect(MailReceipt.java:97)
         at MailReceipt.mailRecieve(MailReceipt.java:62)
         at MailReceipt.main(MailReceipt.java:53)
    I got This Error at the line
    folder = store.getFolder("INBOX");
    in my program.
    Please Help me ion this regards.Thanks in Adnavce..
    Thanx & Regards
    Sandeep Verma

    Well, I've never used this API but it seems 100% clear what's wrong. And 5 seconds with Google has revealed that there's a method on that class which looks like it will address the issue.
    If you can't even read basic error messages, you should seriously question whether you should be programming.

  • Date and time mentioned in my mails are not correct.Similar date for all mails

    The date and time shown in my mails are not correct for all the mails its showing 31/5/12 but these mails were received on 1/11/14.

    Incorrect date or time displayed in various applications

  • Package javax.mail does not exist. Please Help !

    Hi all,
    I am new to Java and I downloaded some sample application and when I try to compile it, I get an error:
    "package javax.mail does not exist".
    I've looked through forums and I know something is wrong with CLASSPATHS and that I also have to download the java mail package, but I dont know how to exactly fix this problem. I would appreciate very much if someone could help me, maybe by telling me the steps I need to take.
    Thanks.

    Hey Rom,
    Thanks for reply.
    The sample application is an authentication module:
    http://java.sun.com/j2se/1.4.2/docs/guide/security/jaas/tutorials/GeneralAcnOnly.html
    But I think this doesnt really matter, as the error I get is because I have manually added the : import java.mail.*; statement. (Maybe I had to mention it in the previous post). Because I want to add some mail client inside.
    I am compiling it using the command: javac, from the commandline menu.

  • Mail attachement content trnsfer encoding 8bit , 7bit

    Good morning to everybody.
    I have a problem reading mail attachement.
    When the attachement is 8bit encoded the exadecimal char "3D" is write in a file as "0D". This is wrong
    When the attachement is 7bit encoded the exadecimal char "3D" is write in a file as "3D" . Thi is right
    Is there anyone who knows why of this beaviour?
    Many thanks

    I'm using the msgshow.java that is the example included in the java mail library.
    Attachement downloaded with JavaMail (the bad one):
    �� 3D ==> 0D (CR)
    2007-05-15;18.11.26;978;000469,00;380;Italy
    ;LUISA SPAGNOLI NAPOLI IT;34009575;8036527 ;5651;00;
    Attachement downloaded with outlook (the good one):
    �� 3D not translated
    2007-05-15;18.11.26;978;000469,00;380;Italy =
    ;LUISA SPAGNOLI NAPOLI IT;34009575;8036527 ;5651;00;
    Here the properties of the mail message:
    Microsoft Mail Internet Headers Version 2.0
    Received: from EXSMTP-IN2.sede.corp.sanpaoloimi.com ([10.244.7.21]) by EVS01.sede.corp.sanpaoloimi.com with Microsoft SMTPSVC(6.0.3790.2499);
         Mon, 28 May 2007 08:09:14 +0200
    Received: from secgw-b-e02.intesabci.it ([172.19.0.27]) by EXSMTP-IN2.sede.corp.sanpaoloimi.com with Microsoft SMTPSVC(6.0.3790.2499);
         Mon, 28 May 2007 08:09:13 +0200
    Received: MHUBINT
    Received: FW
    Received: from mail1.ssb.it ([192.106.129.13])
         by mailbox.intesabci.it with SMTP id l4S696n5006757
         for <[email protected]>; Mon, 28 May 2007 08:09:09 +0200
    Received: (qmail 11377 invoked by uid 509); 28 May 2007 06:02:04 -0000
    Received: from 127.0.0.1 by Imhotep (envelope-from <[email protected]>, uid 501) with qmail-scanner-2.01
    (spamassassin: 3.1.3.
    Clear:RC:1(127.0.0.1):.
    Processed in 0.078893 secs); 28 May 2007 06:02:04 -0000
         Mon, 28 May 2007 08:02:03 +0200 (CEST)
         (Postfix) with SMTP id 6798F34257;Mon, 28 May 2007 08:02:03 +0200 (CEST)
    to: <[email protected]>,
    from: <[email protected]>
    subject: 28 May 2007 08:00 PS12 FROD-ATM1
    MIME-Version: 1.0
    Content-Type: multipart/mixed;
         boundary="P=_NextPart_000_01BD3BAF.A762FD80"
    Date: Mon, 28 May 07 08:00:27 B
    Message-Id: <[email protected]>
    Return-Path: [email protected]
    X-OriginalArrivalTime: 28 May 2007 06:09:13.0674 (UTC) FILETIME=[B707A2A0:01C7A0EE]
    --P=_NextPart_000_01BD3BAF.A762FD80
    CONTENT-TYPE: TEXT/PLAIN; CHARSET="US-ASCII"
    Content-Transfer-Encoding: 8bit
    --P=_NextPart_000_01BD3BAF.A762FD80
    Content-Type: text/plain; charset=us-ascii; name="SPIMI.TXT"
    Content-Disposition: attachment
    Content-Transfer-Encoding: quoted-printable
    X-MIME-Autoconverted: from 8bit to quoted-printable by mailbox.intesabci.it id l4S696n5006757
    --P=_NextPart_000_01BD3BAF.A762FD80
    CONTENT-TYPE: TEXT/PLAIN; CHARSET="US-ASCII"
    Content-Transfer-Encoding: 8bit �������� I think the problem is here
    P=_NextPart_000_01BD3BAF.A762FD80

  • Javax.mail emails not sent

    Hi,
    We are sending emails through the javax.mail class in our application,
    basically
    it works fine, however I was wondering how I could do one of the two:
    1. validate an email address to be correct (existing, not using the java
    classes for rfc validation, but actualy pinging it).
    2. receive a notification about the undeliverable email when it happens (if
    it goes back to weblogic at all, I think I saw a message on the console).
    any help is will be appreciated,
    thanks.
    Asher Bitton

    Stevie, asap...
    Using Disk Utility in Mac OS X 10.4.3 or later to verify or repair disks...
    http://docs.info.apple.com/article.html?artnum=302672
    About Disk Utility's Repair Disk Permissions feature...
    http://docs.info.apple.com/article.html?artnum=25751

  • Javax.mail. package not recognised

    Hi people!!!!
    Please help me out as I am new to j2ee/JavaMail
    I have the j2ee sdk 1.4 installed as well as j2se1.4.2/netbeans conbundle.
    I would create to a simple application that sends an email. However, the compiler doesn't recognise the javax.mail.* and javax.mail.internet.* packages.
    When I type j2ee -verbose at the command prompt it states that it doesn't recognise the command.
    I have set my environment variables as follows:
    J2EE_PATH:      C:\Sun\AppServer\
    J2EE_HOME:     C:\Sun\AppServer\
    JAVA_HOME:     C:\Program Files\j2sdk_nb\j2sdk1.4.2\
    System Variables:
    CLASSPATH:     C:\Sun\AppServer\lib\j2ee.jar
    PATH:     %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\MSSQL7\BINN;C:\Program Files\j2sdk_nb\j2sdk1.4.2\bin\;C:\TOOLS\Tomcat4.1\webapps\Intranet\WEB-INF\classes\;C:\Sun\AppServer\bin\
    Do perhaps know what I have not done correctly....
    Thanks, any assistance will be much appreciated.
    You may email your answers to me at [a href='mailto:[email protected]'][email protected][\a] if you wish
    Regards
    Ushanta

    Hey I have added the mail.jar file to my classpath and I don't get this error any more.... Unfortunately, though I get a java.lang.NoClassDefFoundError Exception in thread 'main'
    I do have a main method, here is my code:
    import javax.mail.*;
    import javax.mail.internet.*;
    import java.util.Properties;
    import java.io.*;
    * @author user
    public class SimpleSender {
    /** Creates a new instance of SimpleSender */
    public SimpleSender() {
    public static void main(String[] args) {
    if (args.length != 3) {
    System.out.println("ERROR");
    System.exit(1);
    String host = args[0];
    String to = args[1];
    String from = args[2];
    String contentType = "text/html";
    Properties props = System.getProperties();
    props.put("mail.smtp.host", args[0]);
    try{
    Session session = Session.getDefaultInstance(props, null);
    MimeMessage message = new MimeMessage(session);
    message.setSubject("Hello");
    message.setFrom(new InternetAddress(from));
    message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
    String text = "<h1>testing email</h1>";
    message.setContent(text, "text/html");
    Transport.send(message);
    } catch (MessagingException e) {
    e.printStackTrace();
    }

  • Javax.mail.*; not being seen by portal in EP 6

    Hello All,
    It seems that when I deploy the following code:
    package com.giggity;
    import java.util.Properties;
    import javax.mail.*;
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.AddressException;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeMessage;
    import com.sapportals.portal.prt.component.AbstractPortalComponent;
    import com.sapportals.portal.prt.component.IPortalComponentRequest;
    import com.sapportals.portal.prt.component.IPortalComponentResponse;
    public class Mailer extends AbstractPortalComponent
      public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
      Properties p = System.getProperties();
      p.put("mail.host", "stmail");
      try{
      MimeMessage message =
    new MimeMessage(Session.getInstance(p, null));
    message.setFrom(new InternetAddress("[email protected]"));               message.setRecipients(Message.RecipientType.TO, InternetAddress.parse("[email protected]"));
    message.setSubject("No work");
    message.setText("Does not work");
    Transport.send(message);
    catch(Exception e)
    I get a javax/mail/Address ClassNotFoundException.  In
    the IDE (Eclipse with PDK plugin, not using NW04), it
    compiles and builds just fine.  What is the problem?
    Thanks.
    -Greg

    Successful compilation or building in the eclipse/NWDS does not mean that it can be successfully deployed on the portal. If the Java build path has all the required jars, any project compiles and builts fine but that build path is not transported to the portal( see inside any par file, there won't be any .classpath and .project files. They are local only files).
    ========
       Add all your third party jar files to the component in this path( ..\dist\PORTAL-INF\lib). There is no need to add mail.jar as it's already available in sap j2ee engine. So add these lines to the portalapp.xml. (as told by jagdeep)
    <application-config>
    <property name="PrivateSharingReference" value="SAPJ2EE::library:mail"/>
    </application-config>
    Regs,
    Bobby

  • Package javax.mail.* not found

    Hello.
    I've got a problem with a program in which I wanted to use the JavaMail-API. I've added the path of the needed jar-files into the CLASSPATH. But when I compile my application I get the error that the package java.mail.* was not found.
    I've also tried it with the JBuilder5 and then I got the followed error message:
    Error #: 302 : No access on the class javax.mail.Session; class javax.mail.Session was not found in a stable package
    What did I do wrong? Please help me.

    The problem is evident, the class you want to use is not in class path. There is no dilemma over that.
    How can you check that the class is in classpath.
    you can use javap command
    If you are using WIN NT /200o you can use the command
    javap with fully qualified name of the class e.g.
    to find if the class String is in classpath
    ==> javap java.lang.String
    This will print all the methods of the class on the DOSpromt. Similarly you can check
    javap javax.mail.Session
    if it doesnot find the class, the class is definitely not in classpath. You can set the class path as: -
    set classpath = %classpath%;"path of mail.jar"
    if mail.jar is located in say c:\jdk1.3\lib\mail.jar
    set the classpath as :-
    set classpath = %classpath%;C:\jdk1.3\lib\mail.jar;C:\jdk1.3\lib\activation.jar
    Now check with javap it is working now and now you can compile you code.
    Hope this helps

  • Mail attachment not being attached

    I am trying to send an attachment but it is not working. I have two versions of the mail function ... one for Entourage and the other for Mail. The Entourage version works ... but the one for Mail does not have the attachment and I cannot see what I am doing wrong. Here is the code:
    on sendEmail(theMessage)
    set subjectvar to "Monthly backup status for " & dateText
    if strMailApplication is "Entourage" then
    tell application "Microsoft Entourage"
    set composeMessage to (a reference to (make new outgoing message ¬
    with properties {recipient:{address:strRecipientAddr, display name:strRecipientName, recipient type:to recipient}, content:theMessage, subject:subjectvar} ¬
    make new attachment at composeMessage with properties {file:strLogFile}
    send composeMessage
    end tell
    else
    tell application "Mail"
    set mailversion to version as string
    set theAttachment to strLogFile
    set composeMessage to (a reference to (make new outgoing message))
    tell composeMessage
    make new to recipient with properties {address:strRecipientAddr, name:strRecipientName}
    set the subject to subjectvar
    set the content to theMessage
    set the sender to strSenderAddr
    tell content
    make new attachment with properties {file name:theAttachment}
    end tell
    end tell
    send composeMessage
    end tell
    end if
    end sendEmail

    I figured it out ... the problem was that I needed to specify the attached file name as an alias ... once I did that I was able to send the attachment.
    Here is the relevant change:
    set theAttachment to file strLogFile as alias

  • Need HELP - Need to send MIME attachements, not UU-encoded.

    Some important recipients are unable to view attachments I send them b/c Mail, by default, sends UU-encoded attachements instead of MIME attachements.
    Is there any way to configure Mail to send MIME attachements?
    FYI to any other people having problems SENDING attachements (this took a while to figure out):
    Google, Yahoo, and some other mail services are not particularly UU-encoding friendly, and the recipients at those addresses sometimes receive a bunch of garbled 'code' or 'script' instead of the actual attachment file.
    I've read lots on these discussions from people trying to deal with READING MIME attachements that other people have sent them, but cannot find any info on switching the SENT preferences to use UU encoding for attachments instead of MIME.
    If anyone can clarify, PLEASE, PLEASE HELP.
    I use .mac to sync my 2 Mac Pros, MB Pro, iPhone, and three Mac Minis, so I'd really like to keep everything 'in sync' with Apple apps. Otherwise I'll have to switch to Entou-rage or Mozilla, which I don't really want to do...
    Thanks in advance for any insight or advice...
    - Sarge

    I've taken the liberty of re-arranging your question for clarification.
    Sarge_ wrote:
    Some important recipients are unable to view attachments I send them b/c Mail, by default, sends UU-encoded attachements instead of MIME attachements.
    I've read lots on these discussions from people trying to deal with READING MIME attachements that other people have sent them, but cannot find any info on switching the SENT preferences to use UU encoding for attachments instead of MIME.
    Which one do you want to use? UU or MIME?
    I do not think that Apple Mail sends UU-encoded attachments. UU is really old.
    There are two settings that can fundamentally change the way Apple Mail sends messages.
    1) Plain text vs. Rich text. With plain text you can't change the fonts or colors or anything else. There is a slight possibility that this mode sends UU attachments, but I can't check from the PC in front of me. Still, I doubt it. Rich text allows fancy fonts and colors.
    2) Send Windows-friendly attachments. This will prevent Apple Mail from sending Macintosh-specific information in an e-mail message. In all cases, Apple Mail only sends standards-forming MIME e-mail messages, but many (all?) PC e-mail clients barf on this 100%-legal MIME e-mail message.
    Is there any way to configure Mail to send MIME attachements?
    Make sure that Windows-friendly attachments is turned on. The only downside is that other Mac users might not get resource data or might have problems with files lacking extensions. No one should be using resource data or files without extensions anymore, so this question is moot. If you do need to do that, wrap your files in a ZIP.
    Google, Yahoo, and some other mail services are not particularly UU-encoding friendly, and the recipients at those addresses sometimes receive a bunch of garbled 'code' or 'script' instead of the actual attachment file.
    This may happen regardless of what you do.
    If anyone can clarify, PLEASE, PLEASE HELP.
    Here is a little write-up I did a few years back on this issue. According the the Apple discusssion regulations, I should say that I do sell a MIME-decoding tool through the link above. However, that tool will not help you send MIME e-mail messages. I'm not trying to sell you anything. These days, any decent e-mail client can handle either UU or MIME messages with no problem. There are a few notable exceptions to this, and unfortunately, those exceptions tend to have millions of customers. It is getting better though.

  • Mail does not correctly reflect read status of Gmail IMAP messages

    Apple Mail is no longer correctly reflecting the read status of emails that have been read on other devices/computers when viewing my Gmail IMAP inbox. Whereas my iPhone and Gmail account both show changes in items' read status immediately or on next mail retrieval, in Apple Mail the only way I have currently of updating the read status is to quit Mail and restart it. Neither automatic fetching of Mail, nor clicking "Get Mail", nor right-clicking the Inbox and choosing "Synchronize Gmail" work.
    My other IMAP account (MobileMe) does not exhibit this behaviour, but Mail.app does this with Gmail on both of my desktop computers.
    Anyone out there with a similar problem? And are there any possible solutions, or is it a bug/incompatibility with GMail?

    This problem is still occurring for me in 10.5.5 - I even tested it by creating a new gmail account with only 1 message in it, in case it was a problem with large mailboxes, and the same thing happened.
    Mail messages marked read elsewhere are not updated in Mail on the next send/receive. I wonder if everyone with this problem could report the bug at http://www.apple.com/support/feedback and see if we can get this solved in 10.5.6

Maybe you are looking for

  • Java.lang.NullPointerException? only on firefox? HELP

    ok, so while running any java applets, i get this error java.lang.NullPointerException at com.sun.deploy.net.proxy.DynamicProxyManager.reset(Unknown Source) at com.sun.deploy.net.proxy.DeployProxySelector.reset(Unknown Source) at sun.plugin.AppletVie

  • Music store isnt working

    i recently updated my itunes with the most recent version, now when i try and go to the music store it gives me a message saying: "iTunes could not connect to the Music Store. Make sure your network connection is active and try again." HELP PLEASE!

  • Average of KF

    Hi All I have a custom ODS with the following : <b>Key</b> Material Plant Cal Month <b>Data</b> Company code Fiscal year period Fiscal year variant PTS (Price to stockist) - Key figure Brand Distribution channel Division I have defined this key figur

  • Updating outlook calendar on blackberry

    When I sync my blackberry to my IMac the calendar updates from the IMac repeat themselves on the phone instead of just maintaining one copy of each event on each calendar...???

  • I don't have iPhone anymore, how do I cancel my apple account

    How do I cancel my IPhone account?  Im not getting messages from anyone with iphone. Any help will work