Adding listener problem after sending the Mail

Hi all

I have to add listener after sent mail because I tested a service when the mail will be sent.

Help, please!

Its Urgent...

Thank you!

Copy the following code

Message m = new Message();

        long millis = System.currentTimeMillis();
        Date d = new Date(millis);

        m.setSentDate(d);

            Address a = null;
        try{
                    a = new Address(_dto.get_email(), _dto.get_fname() + " "
                            + _dto.get_lname());

                } catch (AddressException e) {

                    e.printStackTrace();
                }
            }
        }

        try {

            m.addRecipients(
                    net.rim.blackberry.api.mail.Message.RecipientType.TO,
                    addresses);
        } catch (MessagingException e) {

            e.printStackTrace();
        }
        try {
            m.setContent("\n\n\nbody");

            m.addMessageListener(new MessageListener() {

                public void changed(MessageEvent e) {
/////// here you can check the messageevent instance and check the code //of the event

if (e.getMessage().getStatus() == Message.Status.TX_DELIVERED
                                || e.getMessage().getStatus() == Message.Status.TX_SENT) {
                            //Message Sent

                        } else if (e.getMessage().getStatus() == Message.Status.TX_ERROR
                                || e.getMessage().getStatus() == Message.Status.TX_GENERAL_FAILURE) {
                            //Message failed

                        } else
//Pending

}

} catch (MessagingException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES,
                new MessageArguments(m));

Tags: BlackBerry Developers

Similar Questions

  • I want to have the spell checker for set email sending to automatically check spelling when I send the mail.

    check spelling

    I want to have the spell checker for set email sending to automatically check spelling when I send the mail. I did, but my spell checker is set by default to a French dictionary. How is it still happen? and how can I get it back to English? It's not an option in the menu drop-down button. There is only the French. HELP!
    You no longer have the correction spell checking capabilities in some languages in Outlook Express 6.0 after you install the Microsoft Office 2007 or Office 2010 system
    http://support.Microsoft.com/kb/932974
     
    Outlook Express cannot use the check spelling of MS Word in Office 2007 or newer. A free spell-checking the download is the easiest way to get around this.
     
    Vampirefo spell check.
     
     
     
    You wanted TinySpell or. (Check spelling while typing).
     
    Download it here:
    http://www.tinyspell.M6.NET/ 
     
    Australian English spell checking
    (Also suitable for other English speaking countries).
    http://www.justlocal.com.au/clients/oespellcheck/ 
     
    If you have an earlier version of Office, see this:
    http://www.Outlook-tips.NET/archives/2006/20061228.htm
  • My touch screen has a problem after downloading the IOS 9.0.2. Already try apple advises the steps. But the problem still occur. Already done restart of strength. Factory setting Reset also possible. But still the same problem. Can only be used at one min

    Hello!!!

    IM Apple Fan.

    Purchased IM Ipad2, Ipad4, Iphone6

    Last month I already buy s Iphone6 +.

    Today I feel unhappy

    MY IPHONE 6 'history '.

    My touch screen has a problem after downloading the IOS 9.0.2.

    Already called and try apple advises the steps. But the problem still occur.

    Already done restart of strength. Factory setting Reset also possible. But still the same problem.

    Only can be used for a minute. After that... The problem comes in again & again & again...

    APPLE.COM

    Can U help me

    Only products of Apple of love before updating the version 9.0.2

    iOS 9.0.2 happened some time. The last iOS is iOS 9.2. If you have not updated, updated. If you restored to the factory, it must have downloaded iOS 9.2. Also, if you restore to the factory and the problem is still there, then you must make an appointment at the Genius Bar to the nearest Apple store or Apple authorized service provider or call the Apple Support to have the device examined by Apple. There seems to be something wrong with the screen.

  • I use a trial version now installed en. But it is used a bad Mailadres were you send the mail. How can I change

    I use a trial version now installed en. But it is used a bad Mailadres were you send the mail to check. How can I change this mailadres?

    Hi j. Middelhuis,.

    Please refer to the below threads where the same issue was addressed:

    Bad e-mail address to sign in to Creative Cloud Desktop, how to pass to my email address?

    Email verification to wrong address

    Kind regards

    Sheena

  • Outlook Express keeps coming out of the emails in the Outbox even after sending e-mails to friends.

    Outlook Express keeps coming out of the emails in the Outbox even after sending emails to friendsthen continues to send emails over and over again.

    This occurs even after the email was deleated from Outbox. So that the people that I send to obtain email 20 - 30 times instead of only once.

    Can someone help me solve this problem? I have Microsoft XP Professional on my computer.  Thank you.

    A common cause of this is to have your program configured antivirus to analyze the messages, including outgoing mail.  If you can completely uninstall the AV program, and then reinstall it without the analysis feature mail.  If you can't do that, turn off scanning messages.  You will be just as safe.

  • Problem in sending the request to the server, MDS started after expired connection error

    Hello

    I have a problem when sending request to the server. I need to manage the time of connection error. When I send a request from my device to serve and connection time-out error, I need to send the request back to the server.  To test this error, before sending the request, the MDS quit and then I try sends the request to the server. After 2 minutes, the appliance up Connection Timed out Error.

    Now when I start the MDS and refer the request to the server, the request sent when the connection has expired also reached the server. (Totally 2 request are sent to the server).

    What is the behaviouir of MDS? If so how should I handle this.

    or have I missed something on my side?

    I use BlackBerry 4.2.1 JDE with SDM (4.5.0)

    Thanks in advance.

    (Note: see this link for the behavior of MDS.)

    Hi all,

    I finally found the solution.

    Everytime I go to start the net, I check that the connection is available or not by using below codes...

    HttpConnection conn=null;try    {    conn = (HttpConnection) getConnection(myURL);      if(conn == null)     {           Inform the user the process is in offline       }     catch(Exception e)      {      }      finally      {                try                {                    conn.close();                    conn = null;                }                catch (Exception e)                {                    conn = null;                }            }
    

    When this function is execute the connection is not closed properly.

    After that I got the connection error, start the MDS, meanwhile runs unclosed connection.

    Now, I removed the check above, its works very well.

    I made a mistake. Finally, I saw that and correct it.

    Once again thanks for all your opinions and answer.

    Sorry for my English.

  • An image can be added to a signature in the mail in the window?

    I have a business e-mail address, and the regulation for my profession requires a signature added to each outgoing email that I send. What is a way to add an image to the Windows mail signature? I know that one can be added to Live Mail but I don't like this program so I would continue to use the mail of the window if possible. Thanks in advance.

    Linda

    Note: The HTML Signatures must be less than 4 KB.

    Open a new Message window and create your signature. (Insert the graphic & text). Click on the Source tab (view |) Source Edit if not already checked). Highlight the complete source code and copy / paste into Notepad. File | Save under and in the file name field, save as htm, (i.e. Sig1.htm). It will be saved in My Documents by default. Go to tools | Options | Signatures. Click: File | Browse and insert your saved signature | Apply. You can now rename it if you wish.

    Of course, if the recipient reads in plain text, they don't see the it.

  • Problem in sending E-mail:

    Hello

    I am trying to send an email to the user when signing up for the first time. To do this, I created a scenario of the CCA, but its not to send e-mail to the user.

    Thank you..

    Hi Grando,

    Thanks for the replies. I could solve the problem by changing the TemplateEmailInfo object.

    Concerning

  • interesting problem with sending e-mail

    Hello world
    I faced a very interesting problem. In the code below, I want to send a variable (w_data) with the html, but the recipient do not e-mail, but when I remove the part (w_data) "BOLD" and write a string like "Gauthier", the recipient takes this e-mail. What is the problem, why I can't send a varchar2?


    DECLARE
    v_from VARCHAR2 (80): = "[email protected]";
    v_recipient VARCHAR2 (80): = "[email protected]";
    v_subject VARCHAR2 (80): = "test subject";
    v_mail_host VARCHAR2 (30): = "mail.ere.com.tr";
    v_mail_conn UTL_SMTP.connection;
    CRLF VARCHAR2 (2): = CHR (13) | CHR (10);
    CURSOR cur_
    IS
    Select disconnect_cause in the rawticket_voip;
    w_data VARCHAR2 (31000);


    BEGIN
    v_mail_conn: = UTL_SMTP.open_connection (v_mail_host, 25);
    UTL_SMTP. HELO (v_mail_conn, v_mail_host);
    UTL_SMTP.mail (v_mail_conn, v_from);
    UTL_SMTP. RCPT (v_mail_conn, v_recipient);


    w_data: = ' < html >
    < table border = "1" >
    < tr bgcolor = 'Light Blue' > ';
    FOR C IN CUR_ LOOP
    W_DATA: = W_DATA | "< td >" | C.DISCONNECT_CAUSE | "< table >";
    END LOOP;
    w_data: = w_data | ' < /tr >
    < /table >
    < / html > ';
    UTL_SMTP. DATA
    (v_mail_conn,
    ' Date: '
    || To_char (SYSDATE, ' Dy, hh24:mi:ss DD month YYYY ")
    || CRLF
    || "To:
    || v_from
    || CRLF
    || "Subject:"
    || v_subject
    || CRLF
    || « À : »
    || v_recipient
    || CRLF
    || "MIME-Version: 1.0 '"
    || CRLF
    || ' Content-Type: text/html; "charset ="us-ascii"
    || CRLF
    || w_data
    || CRLF
    );
    UTL_SMTP. Quit (v_mail_conn);
    EXCEPTION
    WHEN UTL_SMTP.transient_error OR UTL_SMTP.permanent_error
    THEN
    raise_application_error (-20000, "cannot send an email: ' |") SQLERRM);
    END;
    /

    Suggest that rather try next approach instead - the start_data() and close_data() calls.

    SQL> declare
      2          type TStrings is table of varchar2(1000);
      3
      4          smtpSender      varchar2(100)   := '[email protected];
      5          smtpRecipient   varchar2(100)   := '[email protected];
      6          mailSubject     varchar2(100)   := 'Sample Mail';
      7          smtpConn         UTL_SMTP.connection;
      8
      9          cursor cur is
     10                  select
     11                          ''||object_type||''||
     12                          object_id||''||object_name||
     13                          ''
     14                  from    user_objects
     15                  order by
     16                          object_id;
     17
     18          mailBody        TStrings;
     19
     20  BEGIN
     21          smtpConn := UTL_SMTP.open_connection( 'mail.telkom.co.za', 25);
     22
     23          UTL_SMTP.helo( smtpConn, 'myserver.somedomain.com' ); -- // this needs to be your Oracle server hostname or IP!
     24          UTL_SMTP.mail( smtpConn, smtpSender );
     25          UTL_SMTP.rcpt( smtpConn, smtpRecipient );
     26
     27          -- can be done using an implicit cursor instead
     28          open cur;
     29          fetch cur bulk collect into mailBody;
     30          close cur;
     31
     32          -- start sending mail body using the data command
     33          UTL_SMTP.open_data( smtpConn );
     34
     35          -- write header
     36          UTL_SMTP.write_data( smtpConn, 'MIME-Version: 1.0'||utl_tcp.CRLF );
     37          UTL_SMTP.write_data( smtpConn, 'Content-Type: text/html'||utl_tcp.CRLF );
     38          UTL_SMTP.write_data( smtpConn, 'From: '||smtpSender||utl_tcp.CRLF );
     39          UTL_SMTP.write_data( smtpConn, 'To: '||smtpRecipient||utl_tcp.CRLF );
     40          UTL_SMTP.write_data( smtpConn, 'Subject: '||mailSubject||utl_tcp.CRLF );
     41
     42          -- empty line between header and rest of mail body
     43          UTL_SMTP.write_data( smtpConn, utl_tcp.CRLF );
     44
     45          -- now write the HTML
     46          UTL_SMTP.write_data( smtpConn, ''||utl_tcp.CRLF );
     47          for i in 1..mailBody.Count
     48          loop
     49                  UTL_SMTP.write_data( smtpConn, mailBody(i)||utl_tcp.CRLF );
     50          end loop;
     51          UTL_SMTP.write_data( smtpConn, '
    '||utl_tcp.CRLF ); 52 53 -- close the data command 54 UTL_SMTP.close_data( smtpConn ); 55 56 UTL_SMTP.quit( smtpConn ); 57 end; 58 / PL/SQL procedure successfully completed. SQL>
  • Just installed OS10.11.5 El Capitan now when I send the mail it sends a copy to my in box, how do I fix this?

    Just updated to El Capitan OS10.11.5 on my MacBook Pro - now when I send an e-mail, using regular mail which has a stamp icon, it sends a copy to my own Inbox. At least, I hope it's to send him a copy and not only it sends mail to me and not to the person I actually talking.  How can I fix?  Thank you.

    In the Mail preferences window, please select the composing tab uncheck the box marked

    Automatic cc: (or BCC :) me)

    If it is checked.

  • ProBook 6470b: problems after format the laptop and load the W7

    Hi all

    Here are my problems:

    After 2 years using the laptop, I decided to format it and reboot with the disk W7 of professional origin.

    At the same time, I exchanged the original SATA HDD with a new SSD in Kingston.

    After you have installed all the drivers, it seems to work very well and much more quickly, but has two problems:

    1 - the automatic update of Windows does not work. Only is looking for available updates, but it ends, even > 24 h research.

    2. before reinstalling, my battery lasts for 5 hours. Now only 2 to 2.5 hours.

    Does anyone have any ideas on how to solve my problems?

    Thanks in advance.

    Ernest

    Good, glad it worked

    Have you had any success with the BIOS settings? Contact HP support directly for this may be a good idea here.

    Captain_WD.

  • Problems after updating the BIOS on Satellite Pro P200

    I recently buy a Satellite Pro P200 running Windows Vista Business. Yesterday, I updated the BIOS to the version 1.50 supplied with the machine to 1.80 available on the Toshiba site. I double checked that I was using BIOS correct update for the Pro P200 Satellitel running Vista.

    After updating the BIOS, I have now two problems:

    1. whenever I start and join the office, I get an error message "record of Vista has stopped working". This problem has been identified as toshibavistaregistration.exe here: [link: http://forums.computers.toshiba-europe.com/forums/thread.jspa?messageID=99805]

    2 Control Panel > system now shows the processor and the memory (RAM) as "not available". Execution of the diagnostic PC Toshoba tool and looking at basic information show also no information on the memory (RAM) Although the processor information here. There may be pieces others missing too under the eyes of list shorter than before the update of the BIOS.

    Basically, I want to get everything working again as it should, but cannot find any information on these issues.

    After further review, it appears that the update of the BIOS is not the cause of the problems.

    Immediately after updating the BIOS, I had a major system crash. It turns out that this is what has caused problems.

    After a system restore to a point before the update of the BIOS and the major system crash, now everything is working again with BIOS version 1.8 in place.

  • Send the Mail SAMPLES

    Hello guys '

    If you send a sample of cod source, help me to give.

    I need to send a mail to my app in development.

    TNX for your support

    There are a number of resources that I suggest that you only consider, before asking a question on the forum.  I recommend the following:

    http://NA.BlackBerry.com/eng/developers/

    Look at all the options in respect of resources.  Particularly useful when requiring a piece of code like this, is the Knowledge Base, available from the link "Developer Support" in the community of the above, either directly:

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe

    There, I did a quick search and found the following, which I think answers your question:

    How - create and send messages
    Article number: DB-00433

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800698/How_To _...

  • Restart the problem after closing the lid of the laptop for a few minutes

    I use Windows 7 Home Premium on my Asus A53S. I have reboot issues a few minutes after closing the computer laptop lid eventhough I put what to do after closing the lid to "do nothing" for both on battery and the plug. And it will keep restarting over and over again. Rest

    Hi DennisHii,

    You did changes to the computer before the show?

    Method 1
    I suggest you perform the clean boot and check if the problem persists.

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7
    http://support.Microsoft.com/kb/929135
    Note: Follow step 3 of section of boot KB929135 to reset the computer in normal mode.

    Method 2
    I suggest you try the steps from the following link:

    Windows 7 is not going to sleep
    http://support.Microsoft.com/kb/976877

    Hope this information is helpful and let us know if you need more assistance. We will be happy to help.

  • VS2010 find lag and check the if condition and send the mail function

    Hi all

    I am very new to this VS2010 (vb.net) programming...
    Actually I want to find the difference between the preset time and current system, if the lag more than the preset time, then I send a mail by outlook. but I wrote something, could you please check and clarify this...
    Much appreciate your help... I hope you understand the encodings below. in the meantime...
    Public void FindTimeDifference()
    Try
    Var t1 As Date = cbshifttime. Text 'date and time - change of time '.
    T2 As Date = DateTime.Now ' now - at the current time of the system
    Var elapsed As TimeSpan = t2 - t1
    MessageBox.Show (elapsed. TotalMinutes)
    If
    End If
    Catch ex As Exception
    MessageBox.Show (ex.) Message)
    End Try
    End Sub
    Private Sub btnlogin_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnlogin. Click
    ' Dim tmediff As String
    ' Tme As String = Format (now, "HH: mm: tt")
    ' Dim tmenw As String = Me.cbshifttime.Text ' 3:30-12:30-19-len
    ' Dim tmenwhrmin As String = Microsoft.VisualBasic.Left (tmenw, 8) ' 15:30
    ' Dim tmenwhrmin1 As String = Microsoft.VisualBasic.Left (tmenw, 6) ' 03:30
    ' Dim tmenwsec As String = Microsoft.VisualBasic.Right (tmenwhrmin, 2) ' PM
    Dim t1 As Date = New Date(2012, 9, 16, 18, 3, 25) ' date and time - time offset
    T2 As Date = DateTime.Now ' now - at the current time of the system
    Var elapsed As TimeSpan = t2 - t1
    «MessageBox.Show (elapsed.» TotalMinutes)
    If getUserDetails (userAcct) then
    writeLogs (userAcct (2) & 'connected')
    End If
    User name Dim As String
    username = getUserName()
    CheckUser (username, Me.txtempid.Text, Me.txtpassword.Text, Me.cbshifttime.Text)
    Tme if <> then tmenw
    tmediff = tme - tmenw
    End If
    'Compare AM or PM.
    If tmenwhrmin1 = Microsoft.VisualBasic.Left(tme, 5) Then
    If tmenwsec = Microsoft.VisualBasic.Right(tme, 2) Then
    On the other
    CreateMail ("* address email is removed from the privacy *", "* address email is removed from the privacy *", "* address email is removed from the privacy *", "Login delay", "HI you have loged wrongly")
    End If
    On the other
    End If

    Hello

    The question that you have posed would be better suited in MSDN. I suggest you post in the MSDN forums.
    http://social.msdn.Microsoft.com/forums/en/category/VisualBasic

Maybe you are looking for

  • Browser does not during the loading of my website!

    Hello. I don't know why this is happening, now, my new website http://www.androidizer.com/ does not work on my firefox browser! If I entered in the url and press ENTER, it'll load and after a while the browser interrupts the answer! Please help me. T

  • Boot Camp for Windows 7

    In order to install Windows 7 on my second MBA, I downloaded the ISO of Windows 7 files and copied on a 250 GB hard drive Tigo. Using Boot Camp assistant to participate my HD I clicked on the 1st and 3rd option, see the ISO of Windows 7 files and I i

  • How can I update the password for GMAIL on MAIL

    Security measures, I recently updated and changed my gmail password. On my mac mail where my gmail is set to receive new messages stopped on the upper right corner, it says "failed to connect". Because the password has changed I hope, but there is no

  • problem printing photo 4 x 6 on Photosmart 6520

    I was able to print 4 x 6 photo after the Photosmart 6520 is installed on my test PC. However, when I tried to print the photo through the bac photo-selection of 4 x 6 size of my PC (Windows 7), photos only appeared in the middle of the landscape wit

  • location of video card intel

    Hello where is the intel hd graphics located on dell l501x card? on the motherboard or the part of the CPU? I think mine has a fault I want to change but did not now what it takes to replace the motherboard or the CPU?