Status of delivery of mail

Hi Friends,
Here i am copying my code. everything is wroking fine. but if i give wrong id also its showing the delivery status message delivered only. It is not showing the not delivered and partially delivered status. Plz help me any one. Thanks in advance
Here is my code :
package com.ils_tech.ediag.ssee.common.mail;
import java.io.*;
import java.util.*;
import javax.mail.Message;
import javax.mail.Session;
import javax.mail.URLName;
import javax.mail.Address;
import javax.mail.Transport;
import javax.mail.MessagingException;
import javax.mail.PasswordAuthentication;
import javax.mail.Authenticator;
//import javax.mail.PopupAuthenticator;
import javax.mail.*;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
import javax.mail.event.TransportEvent;
import javax.mail.event.TransportListener;
import javax.mail.*;
import javax.mail.event.*;
import javax.mail.internet.*;
import javax.activation.*;
public class EMailNotifier implements TransportListener {
     public EMailNotifier(int pInterval) {
     private String content = "";
     private String subject = "";
     Address[] invalidaddresses = null;
     StringBuffer invalidids = new StringBuffer();
     String host = "xxxxx.net";
     String uname = "xxxx";
     String pword = "xxxx";
     int port = 25;
     private static final String SSL_FACTORY = "javax.net.ssl.SSLSocketFactory";
     public void sendMessage(String toAddress, String fromAddress, String Esubject, String Econtent) throws Exception {
          try {
               Properties props=System.getProperties();
               props.put("mail.smtp.starttls.enable","true");
               props.put("mail.transport.protocol", "smtp") ;
               props.put( "mail.imap.socketFactory.class", SSL_FACTORY);
               props.put("mail.smtp.port", "25") ;
               props.put("mail.smtp.user", uname) ;
               props.put("mail.smtp.auth", "true") ;
               props.put("mail.smtp.host",host);
               props.put("mail.smtp.reportsuccess","true");
          props.put("mail.smtp.socketFactory.port", "25");
     props.put("mail.smtp.socketFactory.fallback", "false");
               //Session session=Session.getDefaultInstance(props,auth);
               Session session = Session.getInstance(props,
new javax.mail.Authenticator() {
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(uname, pword);
               Message smtpmsg = new MimeMessage(session);
               smtpmsg.saveChanges();     
               InternetAddress[] addresses = null;
               addresses = InternetAddress.parse(toAddress, true);
               smtpmsg.setRecipients(Message.RecipientType.TO, addresses);
               smtpmsg.setFrom(new InternetAddress(fromAddress));
               smtpmsg.setSubject(Esubject);      
               smtpmsg.setText(Econtent);
               URLName url = new URLName("smtp",host, port, null,uname, pword);
               Transport ts = session.getTransport("smtp");
               ts.connect(host,uname,pword);
               ts.addTransportListener(this);
               System.out.println("Connection :" + ts.isConnected());
               ts.sendMessage(smtpmsg, addresses);
               System.out.println("Mail sent successfully " );
               ts.close();
          catch(javax.mail.MessagingException pException) {
               pException.printStackTrace();
     public void messageDelivered(TransportEvent pTransportEvent){
                    System.out.println("MESSAGE SUCCESSFULLY DELIVERED");
                    printAddresses(pTransportEvent);
     public void messagePartiallyDelivered(TransportEvent pTransportEvent){
               System.out.println("THIS IS IN PARTIAL METHOD");
     public void messageNotDelivered(TransportEvent pTransportEvent){
               System.out.println("THIS IS IN NOT DELIVERED METHOD");
     public static void main(String[] args) {
          EMailNotifier es = new EMailNotifier(1);
          try{
          es.sendMessage("[email protected], [email protected],"Hi","Testing");
          }catch(Exception e)
          {e.printStackTrace();}
}

Maybe this is a security question.
Or maybe some friend of yours, a computer user that dwells in the Windows world, has a serious security problem and his/hers addresses have been taken and are being used to send messages. We don't have virus but we suffer the consequences.

Similar Messages

  • Status=deferred (delivery temporarily suspended) - Urgent help please

    I have a Intel 10.4.10 machine
    I have upgraded amavis-new, spamassassin and clamav
    After the upgrades I could not send mail with PDF attachments.
    I was getting
    FAILED: Can't locate object method "binmode" via package "IO::File" at /Library/Perl/5.8.6/MIME/Body.pm line 437. (in reply to end of DATA command
    I thought I had missed something so I went through "Updating amavis-new From Alex's Tutorial" (http://osx.topicdesk.com/) again.
    Now I am getting status=deferred (delivery temporarily suspended) on all mails
    server:/var/log root# amavisd -V
    amavisd-new-2.5.2 (20070627)
    clamav
    Software version from DNS: 0.91.2
    WARNING: Your ClamAV installation is OUTDATED!
    WARNING: Local version: 0.91.1 Recommended version: 0.91.2
    server:/var/log root# spamassassin -V
    SpamAssassin version 3.2.3
    running on Perl version 5.8.6
    Can someone help me to get mails to be delivered again

    I have a Intel 10.4.10 machine
    I have upgraded amavis-new, spamassassin and clamav
    After the upgrades I could not send mail with PDF attachments.
    I was getting
    FAILED: Can't locate object method "binmode" via package "IO::File" at >>/Library/Perl/5.8.6/MIME/Body.pm line 437. (in reply to end of DATA command
    Sorry should have said that at this point after tryiing to reinstall amavis-new I went back to previous saved versions of amavisd and amavisd.conf.
    Now I am getting status=deferred (delivery temporarily suspended) on all mails
    I have gone through the whole upgrade of amavis-new once again
    I now have mail being sent and received, except for PDF attachments where the logs show
    FAILED: Can't locate object method "binmode" via package "IO::File" at /Library/Perl/5.8.6/MIME/Body.pm line 437. (in reply to end of DATA command
    I seem to be stuck between the old versions were I cannot send mail and the new where I can but with no attachments.

  • "status=deferred (delivery temporarily suspended"

    I have an Intel Xserve running 10.4.10
    Some months ago I upgraded clamav, amavisd-new, spamassassin and squirrel mail using the articles from Alex at http://osx.topicdesk.com/content/category/4/18/62/
    (Thanks Alex)
    All has been working well.
    On Friday night my mail stopped delivering mail to internal recipients with the following in the logs:
    status=deferred (delivery temporarily suspended)
    All mail was sitting in the queue
    I tried a restart on amavisd, but a reboot of the system got it going and retrying all the mail in queue finally dribbled out to end users.
    I have come in this morning with the same scenario
    Feb 12 08:48:37 fileserver postfix/qmgr[28609]: 0A80620B6E96: to=<[email protected]>, relay=none, delay=-3867, status=deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]: Connection refused)
    I was getting moaned at so have done a reboot, which again has cured the issue.
    If anyone can give any pointers as what to look for, or what I can do to stop it occurring, logs appear to show that one minute a mail was being handled correctly, the next it isn't.
    I have posted machine info below
    spamassassin -V
    SpamAssassin version 3.2.3
    running on Perl version 5.8.6
    amavisd -V
    amavisd-new-2.5.2 (20070627)
    clamscan -V
    ClamAV 0.91.1/5779/Mon Feb 11 19:56:48 2008
    postconf -n
    command_directory = /usr/sbin
    config_directory = /etc/postfix
    content_filter = smtp-amavis:[127.0.0.1]:10024
    daemon_directory = /usr/libexec/postfix
    debugpeerlevel = 2
    disablevrfycommand = yes
    enableserveroptions = yes
    html_directory = no
    inet_interfaces = all
    localrecipientmaps = proxy:unix:passwd.byname $alias_maps
    luser_relay =
    mail_owner = postfix
    mailboxsizelimit = 0
    mailbox_transport = cyrus
    mailq_path = /usr/bin/mailq
    manpage_directory = /usr/share/man
    mapsrbldomains =
    messagesizelimit = 0
    mydestination = $myhostname, localhost.$mydomain, fileserver.company.co.uk, company.co.uk,company.com, company4.co.uk,company4.com, reportwell.co.uk,reportwell.com, company3solutions.co.uk,company3solutions.com company2solutions.co.uk, company2solutions.com
    mydomain = company.co.uk
    mydomain_fallback = localhost
    myhostname = mail.company.co.uk
    mynetworks = 127.0.0.1/32,10.1.0.0/16,10.10.1.0/24,192.168.99.0/24,10.12.1.118/32
    mynetworks_style = host
    newaliases_path = /usr/bin/newaliases
    queue_directory = /private/var/spool/postfix
    readme_directory = /usr/share/doc/postfix
    relayhost =
    sample_directory = /usr/share/doc/postfix/examples
    sendmail_path = /usr/sbin/sendmail
    setgid_group = postdrop
    smtpdclientrestrictions = permitsaslauthenticated, permit_mynetworks, rejectrblclient zen.spamhaus.org, rejectrblclient bl.spamcop.net, permit
    smtpddatarestrictions = permit_mynetworks, rejectunauthpipelining, permit
    smtpdhelorequired = yes
    smtpdhelorestrictions = permitsaslauthenticated, permit_mynetworks, checkheloaccess hash:/etc/postfix/helo_access, rejectnon_fqdnhostname, rejectinvalidhostname, permit
    smtpdpw_server_securityoptions = plain
    smtpdrecipientrestrictions = rejectinvalidhostname, rejectnon_fqdnsender, rejectnon_fqdnrecipient, permitsaslauthenticated, permit_mynetworks, hash:/etc/postfix/protected_destinations, rejectunauthdestination, rejectunlistedrecipient, hash:/etc/postfix/access, rejectrblclient zen.spamhaus.org, rejectrblclient bl.spamcop.net, permit
    smtpdsasl_authenable = yes
    smtpdsenderrestrictions = permitsaslauthenticated, permit_mynetworks, rejectnon_fqdnsender, permit
    smtpdtls_keyfile =
    smtpduse_pwserver = yes
    unknownlocal_recipient_rejectcode = 550
    I am also not getting my confirmation mails from sa-learn each evening at all.

    feedback from yesterday.
    I use an application called Carbon Copy Cloner that each evening clones my mirrord pair to a "spare".
    This was showing some errors during the clone.
    I removed the application and schedules. Re-installed and re-configured.
    Last night the Clone completed successfully "AND", more importantly, mail did not stop delivering.
    I am not saying that was the answer yet, but I have my fingers crossed.

  • Packing Status at Delivery Header

    We are in the process of creating a form that will include the details of the all delivery items packed on a handling unit. We want the output to be triggered automatically when the delivery has been completely packed.
    We created a requirement to look at the packing status at delivery header level.  There is a packing status field (VBUK-PKSTK) at delivery header level  and packing status (VBUP-PKSTA) at item level.
    We did not expect the delivery header level header to change to "C" until all item were "C".  However, the header level field changes to "C" when the first item on the delivery is packed.  I
    I looked through the SAP Notes to see if there was something there to address this, but could not find anything. 
    I then searched the forums and found a message from 2007 saying that you must configure item categories with "must be packed" in order for this to work. I know we do not want to configure our system that way.  We have many sites and most do not use handling units.
    However, before I have my developer add code to check all statuses at item level prior to triggering an output, I want to make sure this is what has to be done.  And I have not missed a note to correct this.
    Thanks in advance.

    HI,
           Go to transaction "SE16N" and enter table "VBUK" and give the delivery number in the field sales document number. Now you type "&SAP_EDIT" in the transaction bar and execute. Here you can change the status(Total goods movement). And see If you can actually bill the document. Kindly please let me know If you need any more information on this.
    Regards,
    Ram Pedarla

  • Packing status and delivery status

    What are the fields for packing status and delivery status?

    Hi,
    Please check tables VBUK (header status) and VBUP (item status).
    VBUK-LFSTK ((Delivery status)
    VBUK-PKSTK (Overall packing status of all items)
    VBUP-LFSTA (Delivery status)
    VBUP-PKSTA (Packing status of item)
    Regards,
    Ferry Lianto

  • Field FKSTA- Billing status of delivery-related billing documents not getting updated

    Hi Experts,
    I have a requirement wherein I need to fetch the FKSTA - Billing status of delivery-related billing documents into the datasource 2lis_11_VASTI. I have checked a lot of threads on this topic but have not found a concrete solution yet.
    I have checked the settings in vov7 and vov8 and everything seems to be in place. I have also checked in table VBUP, when I filter based on field FKSTA = 'C', it shows me the outbound delivery document nos. But when I use the related sales document, it shows me blank values. VBUK as well doesn't show any values for field FKSTK.
    I would like to know how and where I can identify the 'billing status of delivery- related' document.
    I can see in VBUP table that if I enter the sales document no. related to the delivery document, it does not show the correct status.  I believe that the statuses should ideally get updated to the underlying VBUK and VBUP tables. Is there any way to update and align them?
    Is there a workaround, a similar field that i can use for datasource enhancement that will give me the correct values?
    Appreciate any help I can get on this as it is urgent.
    Thanks,
    AM

    Hi,
    You are correct that stauts is updated in table VBUK and VBUP.
    However, a sales order does not determine a billing status for delivery related billing, field
    VBUP-FKSTA is only determined for delivey.
    So, it is correct behavior that VBUP-FKSTA = BLANK when searching VBUP with
    VBUP-VBELN = sales order number.
    Just because of above reason, you will not find billing status field in VA03 -> goto header/item;
    you could only find billing status field for delivery in VL03N -> status overview.
    It seems that you are trying to find out sales orders that have been fully deliveried and fully billed, am I right? As far as I know, there is no directly table/field/tcode that could meet your requirement.
    You could consider following workaround:
    firstly, get a list of deliveries that have been fully billied(search VBUP with VBUP-FKSTA = C or search VBUK with VBUK-FKSTK = C);
    Secondly, using these deliveries to search table VBFA to find out related sales orders.
    Hope this helps.
    Best regards,
    Crystal

  • Billing status in delivery not updated for free-of-charge flow

    Hi,
    I have a free-of-charge flow: sales order-delivery-invoice. The invoice has the net value 0 and do not goes in accounting. The problem is that the billing status in delivery is still "not invoiced" and because of this i can make more invoices for the same delivery/qty. Why the status in not updated? The item categ is relevant for billing (A).
    Thanks.

    You can refer SAP Note 33258 - Processing free-of-charge items.
    Where they talk about Item cat setting, use of Cond Type R100.
    Regards
    JP

  • Status of Delivery Document

    Hi..
    Is there any way to check the status of delivery documents.
    I want some delivery documents whose status is <b>'Archived'</b>.

    Hello Rammohan,
    If the delivery is archived already, than it was deleted from the data base. So, that no entries in LIKP or other delivery tables exit for this delivery anymore. You can review the delivery from the archive using the transaction SARI or also using the transaction VL03N (display the delivery) (you will get the message, that the dispayed delivery is archived already).
    Best regards,
    Lela

  • Document Status in overall status of delivery note?

    who can tell me the usage of field 'Document Status' in overall status of delivery note?
    I have read the F1 help but can't understand.
    tks in advance.

    Hi,
    Can you tell me where you are seeing, because in my system its showing only the following -
         Not Relevant
    A     Not yet processed
    B     Partially processed
    C     Completely processed

  • Function module to update Credit status in Delivery

    Hi,
    Is there any function module or BAPI to update the Credit status for Delivery (Outbound) in transaction VL02N.

    Hi Priyanka,
    This BAPI  " BAPI_CREDIT_ACCOUNT_GET_STATUS " will give the required solution.it determines credit status of credit account.
    by
    Prasad GVK.

  • WM status in delivery

    Hi experts,
    I have a query regarding WM status of the delivery item, we are creating delivery with reference to project, material is warehouse managed material WM1 and WM2 views are maintained
    Material has stock in the storage bin which is maintained in material master but WM status in delivery is blank, for the materials maintained similarly relevant WM status appears in delivery.
    Item category for delivery item is DLP
    Please explain what are the settings and master data are there which control WM status in delivery.
    useful answers will be rewarded.
    Thanks
    Anand

    Hi Experts,
    Storage location is mentioned in delivery and thi storage location is warehouse managed, warehouse number is assigned to this storage location.
    delivery item type is DLP(delivery from project) which is used in other materials also where it has relevant WM status.
    In the document flow of the delivery I could find for this particular item where relevant WM status does not appears is shows this item as service, but we have not defined this item as service item neither in project from which delivery is being created nor in the PR or PO agaist which material has been received in warehouse.
    can something be defined in delivery from where it understands that material is a service material ?
    your ansers will be appreciated and rewarded.
    Thanks & Regards
    Anand

  • Getting hundreds of emails fromMail Delivery System MAILER-DAEMON@tajo.unex.es . What do i do to make it stop?

    How do I stop the hundreds of emails from, for example,Mail Delivery System <[email protected]>?

    How do I stop the hundreds of emails from, for example,Mail Delivery System <[email protected]>?

  • Can we set complete status of delivery

    As in sales order we can use reason of rejection to set complete status of sales order similarly is there anyway we can set complete status of delivery at vl02n.(except pgi ofcourse)
    Regards,
    Sam

    Hi,
    You need to delete the delivery in VL02N in case you do not want to go ahead with PGI. In case PGI has been done already, kindly reverse the same in T-code VL09 and then delete the delivery in VL02N. Then put reason of rejection in line item of sales order.
    Thanks & Regards,

  • Status of delivery

    Hi all
    How can we get the status of delivery in CRM from R/3 . where can i see it?
    Thanks
    Sonali

    hi Sonali,
    Its a button on the transaction just the where-used-in list button.
    If the document flow is updated for a transaction in CRM , tht button will be abled and you can be able to see all the documents linked upon clicking..
    Rewards points if helpful
    Siva

  • How to identify  received mail is failure delivery notice mail in javamail?

    Hi friends,
    My requirement is that i have to identify failure delivery notice mails while receiving mails through javamail api pop3..
    Is there anyway to idenity those among normal mails?
    luking forward ur replies dudes...

    If you search this forum you'll find some examples, including a simple modification
    to the msgshow.java demo program to illustrate the basic use. And don't forget
    to read the javadocs for the com.sun.mail.dsn package.
    The basics are...
    Check for a message of type "multipart/report" (isMimeType), fetch the content of
    that message (getContent) and cast it to a MultipartReport object, then use the
    methods of that object to extract the data and process it however you want.

Maybe you are looking for

  • Please help with assigning user to a group in AD using dbms_ldap

    Dear gurus of Apex and LDAP! Please help me a bit. I managed to create any user in AD from Apex using dbms_ldap package and set many of his attributes. But I cannot set that my user belongs to specific group, let's say MY_GROUP. I guess the name of a

  • Weird charging indication with iPhone 5 and iOS 7.0.2

    Sometime shortly after updating my iPhone 5 to iOS 7.0.2 the beep sound changed when inserting the charger cable. The phone charges fine, but now there is a long delay (blank screen for ~5 sec) followed by 2 beeps after plugging in the lightning cabl

  • Pages IWORK'08 spell check doesn't work--here's the fix

    Pages stopped spell checking. Some suggested deleting com.apple.iwork.pages.plist off the HD in case Pages was corrupted so it could rebuild the spell check feature but that was not necessary in my case.  Here is the painless fix. -Open a pages docum

  • How to display mouse coordinates???

    I wanted to display my custom cursors x and y coordinates on my movie. It seems like it should only be a few lines of actionscript but I can't seem to figure it out. Has anyone done this. If so I would appreciate some help. Thx I am using Flash MX by

  • ITunes Mac App Store Affiliate RSS Feeds Broken ?

    Looking at the affiliate RSS Feeds produced by Apple, Many of the backgrounds, instead of being transparent or at least white, are totally black. I have no idea if it is just my Mac being silly, but I don't think it is :/ Check out the problem here: