Java Mail Sending delivery/read receipts

Hi
I am using SMTP Protocol to send a mail... Is it possible to check if mail server is capable of sending delivery/read receipts.
Please do reply me with your suggestions, how to handle it.
Regards
Subramanyam

you need to set the message header "Disposition-Notification-To"
to an email as in the following line of code
msg.setHeader("Disposition-Notification-To", "<[email protected]>");

Similar Messages

  • Can i use java mail APIs to read Unix mail

    hi
    can i use java mail APIs to read Unix mail?
    Unix has "mail" command which can be used to access mails on the Unix system.
    is it possible to execute mail & access unix mails remotely using POP/IMAP
    thanks in advance

    There are JavaMail providers that allow you to access the Unix mail spool files directly. Alternatively the standard JavaMail API can access a POP or IMAP server, if one is installed.

  • Java Mail: send a SINGLE email to a distribution list

    Is it possible to send a single email to a distribution list using Java Mail?
    Please help with some code samples.
    Right now, our mail program uses java mail api to send one email/person in the distribution list and runs in a for loop. Is it possible to have the distribution list in the to field and just send one single email to all persons in the list?
    Thanks,
    Jayashree.

    Yes, of course, assuming your mail server supports
    distribution lists. Most mail servers do, but exactly
    how you create and administer a mailing list varies
    from server to server.
    Once you've created the mailing list on the server,
    just use the name of the list in the To field of the
    message.

  • Mail Sender Adapter - Reading multipel attachments

    Hi,
    I have a scenario like reading mutiple attachment files from a mail server. Based on the attachment type, i have to call RFC or File adapter. I am able to read a single attached file from mail, but could not able to read multiple files. If any one has implemented such a scenario, please let me know.
    I have another question , is it possible to read the name of the attached file dynamically. i saw lot of examples and in forums all are telling about hardcode the attched file name in the parameter key value properties under Module tab. Without hardcode the file name , how to read the attached file from mail.
    I appreceate the help.
    Thanks,
    Manas

    Hi !
    check this out:
    Is it a way to read Multiple Attachment and send all     - Mail Sender?
    sender mail adapter - attachment name
    Regards,
    Matias.

  • Mail Sender Adapter - read from public folder.

    Hello Experts.
    I have a scenario, where I need to read an incoming mail from a public folder, and after mapping the attachment (which is a csv) I need to put the result as a file in a shared folder.
    right now the problem is, I am not sure how to access the public folder.
    should I use one of the exchange users, and try to access the public folder?
    what should I be writing in the URL parameter in the mail sender adapter ? (imap://server/???/public folder ?)
    Also - in case I will want to switch the location of the mail to a private foler inside of the user mailbox - what is the URL parameter in that case?
    Anyone ever did something like this and can help?
    Thanks,
    Imanuel Rahamim.

    Hi Imanuel,
    do u mean u want to pick the mail which contains an attachement from a specified folder instead of inbox?
    u can configure the URL like imap://host:port/path/PublicFolder.
    after PI received the mail. we can use PayloadSwapBean to get the attachement payload and do following message mapping.
    ur question: Also - in case I will want to switch the location of the mail to a private foler inside of the user mailbox - what is the URL parameter in that case?
    do u mean u want to pick the mail from a specified mail account? if like this, create an user for the interface only. then configure the UserName/Password in the channel.
    Regards,
    Kevin Song

  • Why does Mail not support read receipts?

    I find it hard to believe that there is a single email application that doesn't support read receipts. For me it is a fairly basic feature I would expect any decent Mail application to have.
    I am currently in the process of writing an email to a company and I want to make sure they get it - a read receipt is how I want to verify that they've had it. Why does Mail not support this?
    If I am going to have to accept that Mail is not the first class application Apple keeps parading around - is there an alternative that offers this and other features I would expect to find in Microsoft Outlook (minus the calendar etc...)?

    Outlook uses a Microsoft-proprietary system for "read receipts", so there may be no way Apple could implement it, or there may be licensing fees involved, or Apple may just not feel that it's worth spending the money to implement. Outlook which is designed to work primarily with an Exchange server, so it's in Microsoft's interest to support Exchange features (note that even Microsoft in their own Mac app do not support all the features theydo on Windows).
    You can express your interest in this feature to Apple via their feedback pages, if you wish:
    http://www.apple.com/feedback/macosx.html
    but support for return receipts in any system other than Exchange is very unlikely, since as Matt said it is not part of the Internet email specification and hence not widely supported at all.
    Regards.

  • URGENT -java MAil sending pdf as attachment

    I have a small java program that sends the pdf as an attachment without using phisical pdf file.
    but the problem is i am unable to open the pdf that comes as as attachment in mail.
    error while opening pdf : " acrobat cannot open file bcos the file type is not supported or the file is curropted(for example it was sent as email attachment and was not properly decoded)"
    here is the code :
    import java.util.Properties;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.activation.*;
    import java.io.*;
    import java.util.*;
    public class Mailer {
    public static void main (String args[]) {
    String host = "abc";
    String from ="[email protected]";
    String to = "[email protected]";
    //String fileAttachment = args[0];
    // Get system properties
    Properties props = System.getProperties();
    // Setup mail server
    props.put("mail.smtp.host", host);
    // Get session
    Session session =
    Session.getInstance(props, null);
    // Define message
    MimeMessage message = new MimeMessage(session);
    message.setFrom( new InternetAddress(from));
    message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
    message.setSubject("Hello JavaMail Attachment subject");
    // create the message part
    MimeBodyPart messageBodyPart = new MimeBodyPart();
    //fill message
    messageBodyPart.setText("Hi hello this is the msg in mail");
    Multipart multipart = new MimeMultipart();
    multipart.addBodyPart(messageBodyPart);
    // Part two is attachment
    messageBodyPart = new MimeBodyPart();
    String data_to_send = "This msg is sent as an attachment with out using physical file";
    String att_type = "application/pdf";
    messageBodyPart.setText(data_to_send);
    messageBodyPart.setHeader("Content-Type", att_type);
    messageBodyPart.setHeader("Content-Transfer-Encoding", "BASE64");
    messageBodyPart.setFileName("attachment.pdf");
    /* ByteArrayOutputStream byteStream=new ByteArrayOutputStream();
    ObjectOutputStream objectStream=new ObjectOutputStream(byteStream);
    objectStream.writeObject(data_to_send);
    messageBodyPart.setDataHandler(new DataHandler( new ByteArrayDataSource( byteStream.toByteArray(), "application/pdf" )));
         messageBodyPart.setFileName("attachment.pdf");
    multipart.addBodyPart(messageBodyPart);
    // Put parts in message
    message.setContent(multipart);
    // Send the message
    Transport.send( message );
    System.out.println("sent msg");
    Thanks
    Smi

    It's "corrupted" because you are sending a text string and not a PDF document.
    And that commented-out code that uses an ObjectOutputStream would have corrupted a PDF document anyway, if you had one.
    I suggest if this problem is urgent then you hire professional programming help to get it done. You are a long way from a solution.

  • Automatic mail sending at good receipt

    Hello friends
    When a goods receipt against a PO (movement type 101) is done into any plant , an e-mail should be sent to ‘[email protected] ’ stating:
    Material # XXXX quantity XXX has been received into Plant XXXX (field WERKS) Storage Location XXXX (field LGORT) and the date received in.
    Plz suggest how to do this.
    what are the tables that can be used
    wat are the fms that can be used etc
    where this can be configuered,, or done thru ABAP

    Hi,
    1.create an enhancement project using enhancement number:MBCF0005..
    in CMOD and in the below fuction module exit you can add you logic to send the mail.
    <b>EXIT_SAPM07DR_001.</b> in INCLUDE ZXMBCU05 .
    2.you can get all the required data in the MSEG table.
    3. you can use the following fuction module to send the email.
    'SO_NEW_DOCUMENT_ATT_SEND_API1'
    below is the sample code..
    REPORT ZPAVAN_EXAMPLE.
    DATA: OBJPACK     LIKE SOPCKLSTI1 OCCURS 0 WITH HEADER LINE,
          OBJHEAD     LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
          OBJBINLIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
          OBJTXTLIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
          RECLISTLIKE SOMLRECI1 OCCURS 0 WITH HEADER LINE,
          DOC_CHNGLIKE SODOCCHGI1,
          TAB_LINES LIKE SY-TABIX.
    PARAMETER P_EADDR LIKE RECLIST-RECEIVER.    "EXTERNAL E-MAIL ADDRESS
    DOC_CHNG-OBJ_NAME = 'SENDFILE'.
    DOC_CHNG-OBJ_DESCR = 'SEND EXTERNAL MAIL'.
    OBJTXT = 'LINE 1 OF MESSAGE'.
    APPEND OBJTXT.
    OBJTXT = 'LINE 2 OF MESSAGE'.
    APPEND OBJTXT.
    DESCRIBE TABLE OBJTXT LINES TAB_LINES.
    READ TABLE OBJTXT INDEX TAB_LINES.
    DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
    CLEAR OBJPACK-TRANSF_BIN.
    OBJPACK-HEAD_START = 1.
    OBJPACK-HEAD_NUM = 0.
    OBJPACK-BODY_START = 1.
    OBJPACK-BODY_NUM = TAB_LINES.
    OBJPACK-DOC_TYPE = 'RAW'.
    APPEND OBJPACK.
    RECLIST-RECEIVER = P_EADDR.
    RECLIST-REC_TYPE = 'U'.
    APPEND RECLIST.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
         EXPORTING
              DOCUMENT_DATA              = DOC_CHNG
              PUT_IN_OUTBOX              = 'X'
         TABLES
              PACKING_LIST               = OBJPACK
              OBJECT_HEADER              = OBJHEAD
              CONTENTS_BIN               = OBJBIN
              CONTENTS_TXT               = OBJTXT
              RECEIVERS                  = RECLIST
         EXCEPTIONS
              TOO_MANY_RECEIVERS         = 1
              DOCUMENT_NOT_SENT          = 2
              OPERATION_NO_AUTHORIZATION = 3
              OTHERS                     = 4.
    IF SY-SUBRC EQ 0.
      WRITE:/ 'E-MAIL MESSAGE SENT TO', P_EADDR.
    ELSE.
      WRITE:/ 'COULD NOT SEND E-MAIL TO', P_EADDR.
    ENDIF.
    thanks and Regards,
    Pavankumar

  • Java.mail sending email in html format

    I trying to send emails from my java program, I ve managd to send text mails, I want to send email in html format is there a way of doing that and how
    thanks for your help

    Thanks a lot it is working now but I think that sending mails in text format is the best way since there isn't a way of knowing whether the recepient can handel html mails

  • Delivery, Read Receipts

    Hello,
    I'm new to this forum and am hoping someone can help me with a few issues I'm having with my tmoile curve.
    I seem to remember when I first used it that I would get an email message telling me the message I'd sent earlier had been read.  I no longer get these and occasionally need them.  I have made sure it's set to confirm delivery and read.  When I look at the message, the check mark means it's been sent and is in their box, correct?  Does the "d" that i see by some messages mean that they have gotten the message? I've forgotten what I knew before I tried to fix the problem!
    I'd really appreciate some help...my brain is about to explode.  Thanks.

    Go to main messages icon, press menu, options, email settings, change the confirm delivery and confirm read to off 
    If I help you with any inquire, thank you for click kudos in my post.
    If your issue has been solved, please mark the post was solved.

  • Automatic mail sending for goods receipt

    Hello friends
    When a goods receipt against a PO (movement type 101) is done into any plant , an e-mail should be sent to ‘[email protected] ’ stating:
    Material # XXXX quantity XXX has been received into Plant XXXX (field WERKS) Storage Location XXXX (field LGORT) and the date received in.
    Plz suggest how to do this.
    what are the tables that can be used
    wat are the fms that can be used etc
    where this can be configuered,, or done thru ABAP

    solved self. scheduled a backgound job. as no user exit and badi is available

  • Generare e-mail status by tracking Delivery and Read Receipt?Challenge

    Hi,
    I got bit confused, How can I came to know that my e-mail has been successfully sent or not without opening my inbox.
    Am sending 50,000 mails per day by using java mail sending program, while sending I am enabled Delivery and Read receipt and I saved message-id in database and I got that receipt back to my inbox.
    Then I am reading my Inbox using another java program based on message-id concept, And also I need to parse the body of the mail to update the reason if any message failed.
    Here my Inbox received more than 1 lac mails per day as receipts. Because am sending 50,000 mails, So, I got 2 receipt mails for 1 mail, totally 50,000*2=1lac mails in Inbox. My problem is, my reading Inbox java program not able read all 1lac mails at one day. It just reading 5,000 mails per day. When my next day mail sending process started, again i am getting another 1 lac receipts.
    Since I am not able to read and delete the receipts completely, mail counts in my inbox getting accumulated. So, I got stuck, How can I do this?
    If anybody have any other ideas please share with me.
    Already I surfed on net lot, but I can`t find solution for this concept.
    Thanks in advance.

    I think the big question is why can you not read and remove the mail more quickly? What limits you to reading only 5,000 messages per day?
    Also, is this about Oracle Communications Messaging Exchange Server (formerly known as Sun Java Messaging Server)?
    If so, please include the output from the "imsimta version" command.
    If not, you probably should ask in the JavaMail forum: JavaMail

  • How to track Delivery and Read Receipts, to update the e-mail status?

    Hi,
    I got bit confused, How can I came to know that my e-mail has been successfully sent or not without opening my inbox.
    Am sending 50,000 mails per day by using java mail sending program, while sending I am enabled Delivery and Read receipt and I saved message-id in database and I got that receipt back to my inbox.
    Then I am reading my Inbox using another java program based on message-id concept, And also I need to parse the body of the mail to update the reason if any message failed.
    Here my Inbox received more than 1 lac mails per day as receipts. Because am sending 50,000 mails, So, I got 2 receipt mails for 1 mail, totally 50,000*2=1lac mails in Inbox. My problem is, my reading Inbox java program not able read all 1lac mails at one day. It just reading 5,000 mails per day. When my next day mail sending process started, again i am getting another 1 lac receipts.
    Since I am not able to read and delete the receipts completely, mail counts in my inbox getting accumulated. So, I got stuck, How can I do this?
    If anybody have any other ideas please share with me.
    Already I surfed on net lot, but I can`t find solution for this concept.
    Thanks in advance.

    Hi EJP,
    step 2: Taking total inbox length using message.length
    The message count is available via Folder.getMessageCount*().//ok I will try this one.*
    step 3: In for loop, for(i=0; i < = n; i+){+ //--here we are getting mails one by one
    That should be i < n, not i <= n. *//here I was wrongly specified, I used i<n only.*
    step 5: In that mail body we are searching our own unique keyword(which we set for our unique mail reference)
    Searching how?
    In order to find the keyword, we are getting entire text/plain mail body using below method,
    //To get body plain/text body part start here
         public static void getTextPlainBodyPart(Part p) throws Exception {
              if (p.isMimeType("text/plain")) {
                   if (!(showStructure) && !(saveAttachments)){
                       lstr = (String)p.getContent();
              }else if (p.isMimeType("multipart/*")) {
                 Multipart mp = (Multipart)p.getContent();
                 level++;
                  int count = mp.getCount();
                  for (int i = 0; i < count; i++){
                 getTextPlainBodyPart(mp.getBodyPart(i));
                  level--;
    //To get body plain/text body part end hereAbove method will return entire body of the mail in one string variable, Eg: String mailBody;(*mailBody variable contains entire body)*
    Then using mailBody variable we are searching our own keyword(which we set for our unique mail reference while sending mail) using below technique,
    if(lstr.indexOf("!$*#*$") != -1 && lstr.lastIndexOf("$*#*$!") != -1){
    KeyWord = lstr.substring(lstr.indexOf("!$*#*$")+3,lstr.lastIndexOf("$*#*$!"));
    //to get reason alone
    if(lstr.contains("Reason:")){
         Pattern p = Pattern.compile("Reason:\\s([^\\n])*");
    Matcher m = p.matcher(lstr);
    boolean result = m.find();
         while(result) {
            reason = m.group();
             result = m.find();
    //System.out.println("Reason:>>>>"+reason);
    }else{
         reason = "";
    }After getting that keyword in KeyWord variable,
    then we are updating our database using that KeyWord,(here we are using KeyWord variable in where condition in update query)
    Note:_ KeyWord is nothing but, we were stored all our unique keyword against every mails while sending.So, If when get that keyword while reading the receipts,then we can update our table using that same keyword.
    guide how can I do this effieciently. And if you any other new concept please share with me.
    Thanks in advance..
    Edited by: EJP on 17/03/2011 16:54: added code tags. Please use them. Code is 100% illegible otherwise.

  • Sending read receipts

    How can I change settings to stop my mobile from sending read receipts? I’ve turned it off in outlook (as far as I know), but when using my mobile this does not seem to work. Using intellisync and an E65.
    appreciate any advice
    E65

    I logged into my Office 365 Outlook Web Access/Mail and disabled read receipts too, but believe another poster here commented that iOS devices are ignoring and/or by-passing the setting. 
    I'll have to see what it does for the Mail app on OS X. 
    But from what I've read in these forums related to the issue, if the mail.app doesn't support read receipts (which I realize is not a common standard), then why does it send a read receipt when you open/view an e-mail?  That doesn't make any sense. 
    I've always disabled read receipts.  I don't let email rule my day.  Just because I opened an email doesn't mean I read it and should reply to it in a certain time frame.  Your sense of urgency doesn't dictate a priority on my end. 
    In today's world, senders expect immediate responses, just like they do with text messages.  That is ludicrous. 
    Thanks for letting me ramble.  Sure wish there could be a setting or hack for OS X (at the terminal level) to disable this very annoying 'feature'. 

  • Read receipts for mail

    Is there any way to get a read receipt with Mail like there was when I had Outlook in a previous life? Cant find how to block a read receipt when requested either. Any help would be appreciated.
    Thanks

    The Mail application does not include a read receipt request for sent messages nor does it provide a read receipt without your knowledge when requested by the sender of a message when opening a received message.
    I consider this an invasion of privacy. A minor one but an invasion of privacy nevertheless.
    Via the Terminal, you can have Mail "request" a read receipt for all sent messages but this will work only if the recipient's email client supports this and the recipient enables the option.
    http://discussions.apple.com/message.jspa?messageID=2297045#2297045

Maybe you are looking for

  • Problem with checkbox column in matrix

    Hello. I have a little problem with checkbox column in matrix. Column is binded to the UserData. It has ValOn="Y", ValOff="N". I use C++. It is wird problem. In matrix I have 10 columns - scrollbar role and if You want see checkbox column, You must r

  • Can't minimize windows in Finder...

    Any help would be appreciated! Help: For some reason, I cannot minimize any of my windows in Finder... The minimize button is disabled on any window or application... Is it the dock that is not allowing minimization? Thanks.

  • Refcursor

    Hello, SQL> variable a refcursor 1 begin 2 open :a for select * from emp1; 3* end; PL/SQL procedure successfully completed. EMP_ID EMO_NAME EMP_PHONE 1 bsingh 12345 2 csingh 12345 3 ysingh 123 ERROR: ORA-01023: Cursor context not found (Invalid curso

  • Changes to name in SU01

    We are trying to figure out a way to find out if there are changes logged when a user's first or last name are changed in the SU01 record. We have a user whose name was changed in SU01, but have no idea of how to find who changed it or when. Any info

  • Apex & Joomla (CSM)

    Hello everyone. Before I start writing I have to let you know that my English is no so good, I'm from Colombia and here is my case. I'm a Apex fanatic and now I'm building a website for a community where moderator users can make schedule to appointme