Sending � signs with JavaMail

Hi chaps,
At our company we use the JavaMail API through JNI to send emails externally to customers.
Recently the business has decided that it would be nice to send pound (�) through, however it's not going to plan.
Normally the messages are encoded in 7-bit which would seem to exclude the � (163), however it seems that it is first converted to a (=80, hex with no ascii correlation) and then to a Euro symbol.
I've tried setting the "allow8bitmime" property in order to enable the SMTP service to support 8-bit encoding, but it's not working AND Microsoft say that our Exchange (v5.5) doesn't support 8-bit MIME types. The odd thing is that sending external emails via Exchange supports the � with no problems and is read in the mail reader as 8-bit encoded (!).
Has anybody had any experience with issues like this ? Any reply appreciated.
Thanks
Ammonite

Ammonite,
I am working on a similar problem.. Did you say your
email gets translated and prints the Euro symbol... I
actually need out email to print Both the pound and
the Euro and it does niether right now.. The current implementation I am working on will display a Euro instead of a pound, although this isn't by design. The message is encoded using "Quoted-Printable" and substitutes the pound for a =80 character. How this maps to a Euro is unknown to me :(
In standard ascii the pound is outside the standard 7-bit encoding range (163) and featured in the Extended Set on the platform we use. I'm not sure about the Euro. The Iso-8859-1 charset which SH provided supports the pound in "Quoted-Printable" encoding, but this hasn't been well received by JavaMail MIME objects that I have tried.
I haven't managed any sort of 8-bit encoding with JavaMail as yet, due to supposed lack of support in Exchange 5.5 and lack of response to the "allow8bitmime" property.
does anyone know is using MimeMessage limit the
message to ASCII characters only and does that rule
out the Euro and the Pound symbol/
It shoudn't rule them out, but I'm starting to believe that MimeMessages are necessarily helping things here :)

Similar Messages

  • Is there any problem to use multiple threads to send email with JavaMail

    Dear all,
    I am using JavaMail 1.3.2 to send emails with SMTP, it works very well for a long time.
    But one day, I found that the email service hanged and I could never send email again until I restart the tomcat. I found that the reason was a deadlock had been created, the required resource for sending email had not been released.
    I guess the error is due to multiple threads are sending email at the same time. I made a test to create seperate thread for sending each email. After few days, I found this deadlock happened again. So, my question is: Can I use JavaMail with multiple threads? If not, I may need to sychronized all the thread that using JavaMail. I would like to make sure this is the reason for causing the deadlock problem.
    Here is part of my code for using JavaMail:
    transport = session.getTransport("smtp");
    transport.connect(email_host, smtp_user, smtp_pass);
    message.saveChanges();
    transport.sendMessage(message,message.getAllRecipients());
    which is very standard call, and it worked well for a long time.
    Here is part for my thread dump on tomcat:
    (Thread-339)
    - waiting to lock <0x5447c180> (a sun.nio.cs.StandardCharsets)
    (Thread-342)
    - locked <0x5447c180> (a sun.nio.cs.StandardCharsets)
    It seems that these happened after call the method transport.sendMessage() or message.updateChanges()
    , and the underlying implementation may require the JRE StandardCharsets object. But the object had been locked and never be released. So, the sendMessage() or updateChanges() can't be completed.
    Please give me some helps if you have any idea about it.
    Thanks very much!
    Sirius

    Note that the Nightly build gets updated daily (and sometimes more than once in case of a respin) and it is always possible that something goes wrong and it doesn't work properly, so be prepared for issues if you decide to stay with the Nightly build and make sure to have the current release with its own profile installed as well in case of problems.
    See also:
    * http://kb.mozillazine.org/Testing_pre-release_versions
    *http://kb.mozillazine.org/Creating_a_new_Firefox_profile_on_Windows
    *http://kb.mozillazine.org/Shortcut_to_a_specific_profile
    *http://kb.mozillazine.org/Using_multiple_profiles_-_Firefox

  • Sending email with javamail

    Hi
    I am new to javaMail....And i having a problem with this program.
    I getting the following exception when the run the following program
    import javax.mail.*;
    import javax.mail.internet.*;
    import java.util.Properties;
    public class MailDemo
    public static void main(String[] args) throws Exception
    boolean debug = false;
    //Set the host smtp address
    Properties props = new Properties();
    props.put("mail.smtp.host", "smtp.mail.yahoo.com");
    props.put("mail.transport.protocol","smtp");
    props.put("mail.smtp.port","25");
    // create some properties and get the default Session
    Session session = Session.getDefaultInstance(props, null);
    session.setDebug(debug);
    // create a message
    Message msg = new MimeMessage(session);
    Transport transport = session.getTransport();
    // set the from and to address
    InternetAddress addressFrom = new InternetAddress("[email protected]");
    msg.setFrom(addressFrom);
    InternetAddress addressTo = new InternetAddress("[email protected]");
    msg.setRecipient(Message.RecipientType.TO, addressTo);
    // Optional : You can also set your custom headers in the Email if you Want
    msg.addHeader("MyHeaderName", "myHeaderValue");
    // Setting the Subject and Content Type
    //msg.setSubject(subject);
    //msg.setContent(message, "text/plain");
    //Transport.send(msg);
    msg.setSubject("Testing javamail plain");
    msg.setContent("This is a test", "text/plain");
    transport.sendMessage(msg,msg.getRecipients(Message.RecipientType.TO));
    transport.close();
    I get th following error message:
    Exception in thread "main" java.lang.IllegalStateException: Not connected
    at com.sun.mail.smtp.SMTPTransport.checkConnected(SMTPTransport.java:151
    1)
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:548)
    at MailDemo.main(MailDemo.java:51)
    It is a simple program to send a plain email...
    Can anyone help me out
    Thanks in advance
    Deepthi

    It's not connected because you never call Transport.connect.
    It's not clear from your code why you chose to use the more
    complex way of managing the Transport object yourself rather
    than just using the static Transport.send method.
    You're also setting some properties that don't really need to be
    set because they match the default values.

  • Sending Messages with JavaMail

    I am new to JavaMail, and have a few questions. I am writing a Java application that only needs to send mail via an SMTP server.
    1. Do I need the JAF (JavaBeans Activation Framework) if I only want to send mail?
    2. I seem to be stuck at instantiating the Session. I am using the following:
    Properties props = new Properties();
    props.put("mail.smtp.host", "mySMTPhost");
    Session session = Session.getDefaultInstance(props, null);
    If I wrap the Session line in a try/catch, nothing gets piped out to my log file. When I comment out this line, my System.out.println()'s work.
    3. Could this be because I am not using the correct Exception Type?
    Any help would be greatly appreciated.

    how to give arguments for the msgshow demo program.
    i'am using imate mail server.i have email account in
    yahoo.what host,protocol,port numbers must be gn.
    my email id: [email protected]

  • Problem Sending attachments with JavaMail API

    Hi,
    I am able to succesfully able to send the attachment but the body message is not going with it. If i dont send the attachment then the email body goes properly. i can't understand what the problem is . please help.
    import java.util.*;
    import java.io.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.activation.*;
    import com.sun.mail.smtp.SMTPMessage;
    public class Emailer
         String emailSubject = null;
         String emailBody = null;
        String smtphost = null;
         String ccAddr = null;
         String file = "C:\\trainee\\eclipse_lg.gif";
         Vector vecToAddr = null;
         Vector vecCCAddr = null;
         Address fromAddr = null;
      public Emailer(Hashtable hashConfigParam) throws Exception
            smtphost = (String)hashConfigParam.get("host");
            ccAddr = (String)hashConfigParam.get("ccAddr");
            vecToAddr = new Vector();
            vecCCAddr = new Vector();
      public Boolean setFromAddr(String fromEmailAddr)
              try
                   fromAddr = new InternetAddress (fromEmailAddr);
                   //if(true)
                   //throw new IOException();
              catch (Exception e)
                   return null;
         return new Boolean(true);
      public Boolean setToAddr(String toEmailAddr)
              try
                   for(int j=0; j< vecToAddr.size();j++)
                        if(((String)vecToAddr.get(j)).equals(toEmailAddr))
                             return new Boolean(false);
                   vecToAddr.add(toEmailAddr);
                   //if(true)
                   //throw new IOException();
              catch (Exception e)
                   return null;
                   return new Boolean(true);     
         public Boolean setCCAddr(String ccEmailAddr)
              try
                   for(int j=0; j< vecCCAddr.size();j++)
                        if(((String)vecCCAddr.get(j)).equals(ccEmailAddr) && ((String)vecCCAddr.get(j)).equals(ccAddr))
                             return new Boolean(false);
                   vecCCAddr.add(ccEmailAddr);
                   vecCCAddr.add(ccAddr);
                   //if(true)
                   //throw new IOException();
              catch (Exception e)
                   //System.out.println(e.getClass().getName());
                   return null;
              return new Boolean(true);               
         public Boolean setEmailSubject(String subject)
              try
                   emailSubject = subject;
                   if(emailSubject.equals(null))
                        return new Boolean(false);
                   else
                        return new Boolean(true);
              catch (Exception e)
                   return null;
              //return new Boolean(false);
         public Boolean setEmailBody(String body)
              try
                   emailBody = body;
                   if(emailBody.equals(""))
                        return new Boolean(false);
                   else
                        return new Boolean(true);
              catch (Exception e)
                   return null;
              //return new Boolean(false);
      public void sendEmail()
           try
                Properties eMailConfigProps = null;
                eMailConfigProps = System.getProperties();
                eMailConfigProps.put("mail.smtp.host", smtphost);
                Session session = Session.getInstance(eMailConfigProps, null);
                MimeMessage message = new MimeMessage(session);
                   try
                     message.setFrom(fromAddr);
                      for(int i=0; i< vecToAddr.size(); i++)
                         message.addRecipient(Message.RecipientType.TO,new InternetAddress((String)vecToAddr.get(i)));
                         for(int i=0; i< vecCCAddr.size(); i++)
                          message.addRecipient(Message.RecipientType.CC,new InternetAddress((String)vecCCAddr.get(i)));
                      message.setSubject(emailSubject);
                      //message.setText(emailBody);
                       BodyPart messageBodyPart = new MimeBodyPart();
                        messageBodyPart.setText(emailBody);
                        Multipart multipart = new MimeMultipart();
                        DataSource source = new FileDataSource(file);
                        messageBodyPart.setDataHandler(new DataHandler(source));
                        messageBodyPart.setFileName(file);
                        multipart.addBodyPart(messageBodyPart);
                        message.setContent(multipart);
                        Transport.send(message);
                   catch (SendFailedException ex)
                     ex.printStackTrace();
                   catch (MessagingException ex)
                     System.err.println("Exception. " + ex);
           catch (Exception e)
                System.out.println(e.toString());
    public static void main(String args[])
          Hashtable hash = new Hashtable();
          hash.put("host","213.312.230.211");
          hash.put("ccAddr","[email protected]");
         try
               Emailer objEmailer = new Emailer(hash);
              Boolean fromFlag = objEmailer.setFromAddr("[email protected]");
              String toAddresses = "[email protected]";
              String ccAddresses = "[email protected]";
              Boolean toFlag = objEmailer.setToAddr(toAddresses);
              Boolean ccFlag = objEmailer.setCCAddr(ccAddresses);
              Boolean subjectFlag  = objEmailer.setEmailSubject("Emailer.java");
              Boolean bodyFlag = objEmailer.setEmailBody("blah blah blahblha ");
              if((fromFlag.toString()).equals("true") && (toFlag.toString()).equals("true") && (bodyFlag.toString()).equals("true"))
                   objEmailer.sendEmail();
         catch(AddressException e)
              e.printStackTrace();
         catch(Exception e)
              e.printStackTrace();

    i.e example :
    u can do it in this way
    MimeBodyPart messageBody = new MimeBodyPart();
    messageBody.setText("your message body goes here");
    // attaching file i.e make separate object of body part
    MimeBodyPart messageBodyPart = new MimeBodyPart();
    DataSource source = new FileDataSource(filePath);
    messageBodyPart.setDataHandler(new DataHandler(source));
    messageBodyPart.setFileName(fileName);
    multipart.addBodyPart(messageBody);
    multipart.addBodyPart(messageBodyPart);
    mimemessage.setContent(multipart);
    Transport.send(mimemessage);

  • Sending Attachments with JavaMail API

    I have an application where I need to develop a simple e-mail servlet where, from an HTML form, clients can enter their return email address and attach a file and send it to me. The jGuru short course said that when trying to send attachments via a servlet, the user must upload the attachment with the encoding type "multipart/form-data". If I remove the "enctype=multipart/form-data" statement, I can successfully send an email without an attachment. But when I add the statement, the servlet fails. Here is the HTML that I have been using, without success:
    <form enctype="multipart/form-data" action="../servlets/TestEmail" method="post">
    From: <input type="text" name="from" value=""><br>
    Subject: <input type="text" name="subject" value=""><br>
    File to Attach: <input type="file" name="filename"><br>
    Message: <textarea name="message"></textarea><br><br>
    <input type="submit" value="Send">
    </form>
    Can anyone show me the error of my ways?
    Many thanks.
    Chris

    Hi,
    You'll need to use the servlet attachment jar from http://www.servlet.com in your webserver library. Check out the site, it'll tell you what to do.
    I've also done an example servlet at http://www.salniere.com/WebTests/ServletMail which you can download and check out.
    good luck
    Kevin

  • Sending chinese HTML with javamail - is there no definitive answer ?

    I'm using the following code to send a HTML and text e-mail
    (text for people with HTML-challenged email clients). I sent
    2 emails to 2 email addresses which reside on the same server
    - eg. [email protected] and [email protected] - and read the
    emails with the same e-mail client (Eudora) on the same PC.
    The HTML and Chinese displays perfectly when it's sent to one
    of the email addresses ([email protected]) but the HTML and
    Chinese are always corrupt when I send them to the other.
    This is a repeatable error and it has me completely stumped.
         // Example Initial values (drawn from a database) :
         String smtpHost = "mail.mydomain.com";
         String sender = "[email protected]";
         String subject = "Give me strength.... ";
         InternetAddress sender = new InternetAddress("[email protected]");
         InternetAddress receiver = new InternetAddress("[email protected]");
         String txtMsg = "a long text message blah...";
         String htmlMsg = "<h1>Wooo</h1><img src='http://mydomain.com/blink.gif'>";
         String language = "zh-tw" // can also be "en-us" or "zh-cn"
         // CREATE MAIL MESSAGE & HEADERS
         Properties props = System.getProperties();
         props.put("mail.smtp.host", smtpHost);
         Session session = Session.getDefaultInstance(props, null);
         Message msg = new MimeMessage(session);
         msg.setFrom(sender);
         msg.addRecipient(Message.RecipientType.TO, receiver);
         msg.setSubject(subject);
         msg.setSentDate(new Date());
         msg.setHeader("Mime-Version" , "1.0" );
         msg.setHeader("Content-Transfer-Encoding", "quoted-printable");
         // MESSAGE BODY - TEXT & HTML
         MimeMultipart mimeAllContent = new MimeMultipart("alternative");
         MimeBodyPart mimeText = new MimeBodyPart();
         MimeBodyPart mimeHtml = new MimeBodyPart();
         mimeText.setText(textMsg);
         mimeText.setHeader("Mime-Version" , "1.0" );
         mimeText.setHeader("Content-Type" , "text/plain");
         mimeText.addHeader("Content-Type", "charset=UTF-8");
         if (!language.equals("")) {
              mimeText.setHeader("Content-Language", language);
         mimeText.setHeader("Content-Transfer-Encoding", "quoted-printable");
         mimeHtml.setContent(htmlMsg, "text/html");
         mimeHtml.setHeader("Mime-Version" , "1.0" );
         mimeHtml.setHeader("Content-Type" , "text/html");
         mimeHtml.addHeader("Content-Type", "charset=UTF-8");
         if (!language.equals("")) {
              mimeHtml.setHeader("Content-Language", language);
         mimeHtml.setHeader("Content-Transfer-Encoding", "quoted-printable");
         mimeAllContent.addBodyPart(mimeText);
         mimeAllContent.addBodyPart(mimeHtml);
         msg.setContent(mimeAllContent);
         msg.setHeader("Content-Type" , mimeAllContent.getContentType());
         // SEND THE MESSAGE
         msg.saveChanges();
         Transport.send(msg);
         return true;
    Let me repeat - Using the code below, a HTML & Text ("Alternative"
    MimeMultiPart) message is sent, and arrives at the recipient's
    mailbox. When it is sent to one user ([email protected]), it never
    renders properly. When it is sent to another ([email protected]), it's
    OK. The destination server, email client, PC are the same in both
    cases and the only variable is the recipient's email address.
    How can this be ?
    I think I've gone overboard by setting the Content-Transfer-Encoding
    for both the HTML and Text MimeParts as well as the actual Message.
    Could somebody please confirm which parts I should set the Content-
    -Language, Content-Transfer-Encoding and Content-Type b/c I'm
    going in circles at the moment.
    Thanks indeed, to anybody who has experience sending doublebyte
    with Javamail and can help me clear this up once and for all.
    I find it incredible that after 3 years, there is still no
    definitive answer to accomplishing this, and it remains an
    elusive black art.
    Regards,
    chas
    ps. The data being sent is in MySQL not that that matters at all.

    Try adding code to validate submitted email addresses before they go into your database.
    String emailAddress = (from where ever)
    if(emailAddress != null) emailAddress = emailAddress.trim();
    if(emailAddress == null) // skip this address
    // I also check for a list of illegal internet email address characters, as I think the email addresses allowed by Javamail are too lenient.

  • I Can't send a message with JavaMail

    I can't send mail with JavaMail. I Try send a e-mail, for example, to: [email protected], from: [email protected], my smtp: smtp.alunos.ufu.br, but when i try it, i received a message the e-mail [email protected] not in server smtp.alunos.ufu.br.
    I don't anderstend what happen. I need the alunos.ufu.br send my message to [email protected]
    Somebody can help me ?????

    I think the problem is that your smtp server smtp.alunos.ufu.br is not relaying to addresses not local to itself. Please post the exact stack trace. There is some 500 level error being returned by the server that will tell you exactly what is happening.

  • How to send "Blob" in mail Attacthemnt with Javamail

    Hi,
    I need send a mail with attach file that is stored in bd. The column is a BLOB (any file) , and i need send directly with JavaMail..
    Any idea or sample???
    Thanks

    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:255615160805

  • How to send a message with javamail api

    Hi, anybody can tell me how i do to send a message with javamail?
    Thanks.
    Daniele.

    [rossifumi80],
    Here's a simple JavaMail application SendMessage.java that will connect a SMTP host and send a mail message out:
    import java.util.Properties;
    import javax.mail.*;
    import javax.mail.internet.*;
    public class SendMessage {
      public static void main (String args[]) throws Exception {
        String host = args[0];
        String from = args[1];
        String to = args[2];
        // Get system properties
        Properties props = System.getProperties();
        // Setup mail server
        props.put("mail.smtp.host", host);
        // Get session
        Session session = Session.getDefaultInstance(props, null);
        // Define message
        MimeMessage message = new MimeMessage(session);
        // Set the from address
        message.setFrom(new InternetAddress(from));
        // Set the to address
        message.addRecipient(Message.RecipientType.TO,
          new InternetAddress(to));
        // Set the subject
        message.setSubject("Hello JavaMail");
        // Set the content
        message.setText("Welcome to JavaMail");
        // Send message
        Transport.send(message);
    }HTH.
    Allen Lai
    Developer Technical Support
    SUN Microsystems
    http://www.sun.com/developers/support/

  • Sending attachments with emails in Javamail

    I'm trying to send attachments with emails using Javamail. Following is the code through which I'm trying to achieve that. It works as expected on a JRE1.6 environment. But on JRE1.5, the content of the file gets added to the mail body as text.I want the file to be sent as an attachment.
    Any pointers on the observed difference in behavior would be highly appreciated!
    String msgText = mailInfo.getMessage();
            String attachmentFileName = mailInfo.getFileName();
            MimeBodyPart mimeBodyPart = new MimeBodyPart();
            mimeBodyPart.setText(msgText);
            // create the second message part
            MimeBodyPart attachmentBodyPart = new MimeBodyPart();
            // attach the file to the message
            FileDataSource fileDataSource = new FileDataSource(attachmentFileName);
            attachmentBodyPart.setFileName(fileDataSource.getName());
            attachmentBodyPart.setDataHandler(new DataHandler(fileDataSource));
            // create the Multipart and add its parts to it
            Multipart multipart = new MimeMultipart();
            multipart.addBodyPart(mimeBodyPart);
            multipart.addBodyPart(attachmentBodyPart);
            message.setContent(multipart);The email in case of JRE1.5 is as follows
    {color:#0000ff}------=_Part_0_33189144.1233078680250
    Content-Type: text/plain; charset=us-ascii
    Content-Transfer-Encoding: 7bit
    Hi...Test Mail
    ------=_Part_0_33189144.1233078680250
    Content-Type: application/octet-stream; name=corba_architecture.pdf
    Content-Transfer-Encoding: base64
    Content-Disposition: attachment; filename=corba_architecture.pdf
    Content-ID: Attachment
    JVBERi0xLjIgDSXi48/TDQogDTggMCBvYmoNPDwNL0xlbmd0aCA5IDAgUg0vRmlsdGVyIC9GbGF0
    ZURlY29kZSANPj4Nc3RyZWFtDQpIiUWPW07DMBBFV+A93E9QlWBP/Kj5awt8USFRbyBKnTQIkshK
    YfvYcQoaybrSzDkzFhCxQgemeWkUyKTXEIeSHMGjZXvHSFBJCpXUpQLcE+NIlbCHFw4pUxeuZQUv
    ueY25gYxk9mKmH9wtwvNpZ99M1+jc2wxXzxweHvf73AP9xGFhaIsTyC3/w6ZDYfxaxoHP8w4jmf/
    ------=_Part_0_33189144.1233078680250-- {color}

    Following is the debug trace obtained on running the program on 1.5.
    +12:45:57,218 INFO [MailerThread] EmailManager:306 - Sending message {toAddress [email protected],+
    +replyTo =null,+
    +cc =null,+
    +message =Hi...Test Mail,+
    +subject =test mail,+
    +contentType =null fileName =C:\docs\cbe\dist computing\A.txt }+
    Loading javamail.default.providers from jar:file:/C:/docs/cbe/lib/mail-1.4.jar!/META-INF/javamail.default.providers
    DEBUG: loading new provider protocol=imap, className=com.sun.mail.imap.IMAPStore, vendor=Sun Microsystems, Inc, version=null
    DEBUG: loading new provider protocol=imaps, className=com.sun.mail.imap.IMAPSSLStore, vendor=Sun Microsystems, Inc, version=null
    DEBUG: loading new provider protocol=smtp, className=com.sun.mail.smtp.SMTPTransport, vendor=Sun Microsystems, Inc, version=null
    DEBUG: loading new provider protocol=smtps, className=com.sun.mail.smtp.SMTPSSLTransport, vendor=Sun Microsystems, Inc, version=null
    DEBUG: loading new provider protocol=pop3, className=com.sun.mail.pop3.POP3Store, vendor=Sun Microsystems, Inc, version=null
    DEBUG: loading new provider protocol=pop3s, className=com.sun.mail.pop3.POP3SSLStore, vendor=Sun Microsystems, Inc, version=null
    DEBUG: getProvider() returning provider protocol=smtp; type=javax.mail.Provider$Type@77eaf8; class=com.sun.mail.smtp.SMTPTransport; vendor=Sun Microsystems, Inc
    DEBUG SMTP: useEhlo true, useAuth false
    DEBUG SMTP: trying to connect to host "10.16.68.131", port 25, isSSL false
    +220 mailhost5.vmware.com ESMTP Postfix (mailhost5)+
    DEBUG SMTP: connected to host "10.16.68.131", port: 25
    EHLO sbanerjee
    +250-mailhost5.vmware.com+
    +250-PIPELINING+
    +250-SIZE 26800000+
    +250-VRFY+
    +250-ETRN+
    +250-ENHANCEDSTATUSCODES+
    +250-8BITMIME+
    +250 DSN+
    DEBUG SMTP: Found extension "PIPELINING", arg ""
    DEBUG SMTP: Found extension "SIZE", arg "26800000"
    DEBUG SMTP: Found extension "VRFY", arg ""
    DEBUG SMTP: Found extension "ETRN", arg ""
    DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
    DEBUG SMTP: Found extension "8BITMIME", arg ""
    DEBUG SMTP: Found extension "DSN", arg ""
    DEBUG SMTP: use8bit false
    MAIL FROM:<[email protected]>
    +250 2.1.0 Ok+
    RCPT TO:<[email protected]>
    +250 2.1.5 Ok+
    DEBUG SMTP: Verified Addresses
    DEBUG SMTP:   [email protected]
    DATA
    +354 End data with <CR><LF>.<CR><LF>+
    ------=_Part_0_3278348.1233126957281
    Content-Type: text/plain; charset=us-ascii
    Content-Transfer-Encoding: 7bit
    Hi...Test Mail
    ------=_Part_0_3278348.1233126957281
    Content-Type: text/plain; charset=us-ascii; name=A.txt
    Content-Transfer-Encoding: 7bit
    Content-Disposition: attachment; filename=A.txt
    Content-ID: Attachment
    adasdasdd
    ------=_Part_0_3278348.1233126957281--
    +.+
    +250 2.0.0 Ok: queued as 5BE5BDC100+
    +12:45:59,125 INFO [MailerThread] EmailManager:331 - Message {toAddress [email protected],+
    +replyTo =null,+
    +cc =null,+
    +message =Hi...Test Mail,+
    +subject =test mail,+
    +contentType =null fileName =C:\docs\cbe\dist computing\A.txt } sent to the SMTP server successfully+

  • Empty Attachment after sending with JAVAMAIL

    Hey!
    In my stand-alone-application works like a observer and i have the following problem:
    I send a zipfile that contains a xsl-document. I also us the AES256 encryption for the Zip-File.
    So my apllication send a mail depending on the database-tables.
    After getting the mails:
    First run
    The first one contains the xls-document but the content is not right (some hex codes)
    Second run
    Zip-file is empty
    Third run
    Correct
    Fourth run
    Zip-file is empty.
    Further Information:
    After Transport.send(msg); i rename the attachment-files in my java-code automatically
    Please help me?

    Sorry, I'm not understanding what you're doing.
    On the mail sending side, does the file exist? Is the file content present in the message
    you send?
    I'm sure you understand that file names sent by the sender have no meaning to the recipient.
    You need to send the file contents. Normally, attaching a file to a message will send the
    contents, and will send the name in case the recipient wants to save the file under the same
    name.
    If you're properly attaching the file to the message, and you're not getting the file contents
    included in the message when you send it, you're doing something wrong on the sending
    side.
    JavaMail comes with demo programs that show how to attach a file. Try to get the
    sendfile.java demo program to work for you first. If that doesn't work, provide more
    details of what you're doing, including a protocol trace.

  • Send mail with no sender address using Javamail

    I'm trying to send emails using javamail, it works fine but I would like to send emails with no sender address. When I don't set :
    message.setFrom(new InternetAddress("[email protected]"));
    or do just
    message.setFrom()
    I get my_user_name@my_machine_name as the sender address when i recieve the email.
    I understand the security problems about sending emails without sender but i need to automate the sending of confirmation messages that recievers can't answer to.
    Quentin.

    I get a lot of e-mail newsletters that say at the bottom "Please do not reply to this, nobody will read your reply". What's wrong with that? Set up an address and automatically purge any messages sent to it on a regular basis.
    Or if you want a different way to annoy people, use an address that doesn't exist on your server. Then people get a bounce message when they reply to it.
    You might also want to evaluate commonly-used spam filters and see if they filter out messages that don't have from-addresses. No point sending people messages if they get filtered out.

  • I can't send messeges with my ipad, always appear a box asking me to sign in, but it doesnt work, what can I do?

    I can't send messeges with my ipad, always appear a box asking me to sign in, but it doesnt work, what can I do?

    Are you talking about iMessages or email?

  • Problem with Javamail in Red Hat

    Good afternoon.
    I have a problem with javamail in Red Hat.
    When i send a email in windows with my application, works well. But in Red Hat no works.
    Gives the following error:
    Java.lang.ClassCastException .... gnu.mail.handler.TextPlain
    Does anyone know that happens?

    You have much to learn. This is the wrong forum for most of it.
    You should be able to use the package manager in Linux to
    uninstall the Gnu version. Then read this:
    [http://java.sun.com/products/javamail/FAQ.html#install|http://java.sun.com/products/javamail/FAQ.html#install]

Maybe you are looking for

  • XI and user authentication VS R/3 systems

    Hi *, I'm trying to configure this kind of scenario: 1) user xyz sends a request to a web service, which is exposed by XI via its outbound interface 2) XI performs all the necessary mapping stuff and via the routing procedure identifies the right inb

  • PID v5.0 compatability with LV 8.0

    Hello, Where can I read up on the pros-n-cons of upgrading the PID Control Toolset v5.0 to v7.0 working with Labview 8.0? Definitely worth it? Don't bother? Is the issue a non-issue? Thnx.

  • Oracle 9i release 2 on Windows ME

    I would like to know whether i can run Oracle 9i release 2 on Windows ME platform ( any turnaround solution ), or do i need to upgrade the O/S to XP. Thanks, Manish Jain.

  • Colors are too bright when Indesign CS 5.5 exports .swf

    I created a document in Illustrator and transferred the layers over to InDesign CS 5.5 to make an interactive .swf. The colors stayed the same until I exported the .swf from Indesign and the golden yellows became obnoxiously bright. What's even stran

  • Issue in Goods Receipt for Kanban '

    Hello I have two Kanbans for Qty 10 EA I receive the goods in two steps: 1. GR MVT 103 2. GR MVT  105 When 103 doc is posted for 10 Pcs one Kanban turns to Green for 10 Pc. When I release the blocked stock again the other Kanban also turns Green thou