Send Email of Current VC Screen.

Dear All,
I have to send the email of print screen in VC like, what we get from Button Action.     
System Action: Print
Apply to: Self
Parameters: Print Screen
Thank you,
Regards,
Devasarathy Pandi

Dear Basheer,
Can you explain how to use "Export Screen" in push button's system action.
Actually, Push Button has 3 Actions,
1. System Action
2. Custom Action
3. No Action
In system action we have Export Data parameter as Export Screen.  How we can use that?
Thank you,
Regards,
Devasarathy Pandi.

Similar Messages

  • Sending Email with current IP address in it

    I have done scripting in LotusScript for Lotus Notes. When I was younger, I did BASIC, Pascal, Assembler. I am trying to figure out Applescript and how it relates with each application.
    Currently, I am trying to create an Applescript which will, upon a receipt of an email from a particular user (me) and a particular subject, would send an email back to the user with the current external IP address of my machine. I already have the "hard" part of getting the IP from a script created by Koert Bonte but modified by me:
    set GetIP to do shell script "/usr/bin/curl http://checkip.dyndns.org/"
    This will receive something like this:
    <html><head><title>Current IP Check</title></head><body>Current IP Adress: 1.2.3.4</body></html>
    set AppleScript's text item delimiters to ":"
    set temp to the second text item of GetIP
    This will return with:
    1.2.3.4</body></html>
    set Applescript's text item delimiters to "<"
    set theIP to the first text item of temp
    (* This gets the IP address:
    1.2.3.4
    Now, I can create a rule in Mail to look for my name and subject, what I have not been able to figure out is how to send either a new message back with the IP address or a reply back with same. I would like to see examples of both .<br>
    Cube, G4 TiPB, iMac    

    Hi Zeff,
    With Applescripts called from Mail rules you need to use 'on perform mail action' to get the list of messages that triggered the rule. This needs to be in a 'using terms from application "Mail"' block so the processor will understand what 'on perform mail action' means. Generally you would loop through the list of messages (it will be a list even if there is only one iten in it).
    So you would wrap a Mail rule script in something like:
    using terms from application "Mail"
    on perform mail action with messages myMessages
    repeat with myMessage in myMessages
    -- the body of your script goes here
    end repeat
    end perform mail action with messages
    end using terms from
    Using the above, you need to tell Mail as usual if you want it to do something:
    using terms from application "Mail"
    on perform mail action with messages myMessages
    repeat with myMessage in myMessages
    -- get ip
    set myIP to my fetchIP()
    tell application "Mail"
    -- make new outgoing message
    set mymail to (make new outgoing message at the beginning of outgoing messages with properties {subject:"My IP", content:myIP})
    -- add recipient
    tell mymail to make new to recipient at beginning of to recipients with properties {address:extract address from (sender of myMessage)}
    -- send it now
    send mymail
    end tell
    end repeat
    end perform mail action with messages
    end using terms from
    on fetchIP()
    try
    set myIP to word 25 of (do shell script "curl checkip.dyndns.org")
    on error
    try
    set myIP to word 1 of (do shell script "curl www.showmyip.com/simple/")
    on error
    display dialog "External IP check failed."
    end try
    end try
    return myIP
    end fetchIP
    I used a handler called fetchIP to call the machine's IP. Note this is similar, but different to yours. Then make a message in Mail with the subject 'MyIP' and the body of the message as the IP. Then add the recipient as the sender of the message which triggered the rule. Finally send the message.
    To add the contents of the original message take a look at Mail's Applescript dictionary for 'content'.
    Best wishes
    John M

  • Send EMail when current processor changes

    Dear all,
    is it possible to automatically send an email, every time the processor of an incident is changed?
    Via Action? What conditions should i choose etc.?
    Any help would be much appreicated
    Best Regards
    Daniel Titze

    Daniel,
    I assume that you followed the steps of this blog: Pep Up Your ChaRM - Part 1: HowTo Create a Smart e-Mail Action
    However, if you want to send an email when a processor is changed, then that would involve some development work. What we did here at our company was we leveraged off of OSS note 865619. We used the BADI that was documented in here to do partner comparison, if the current processor is different from the assigned processor, then a flag would be sent to be used later by the conditions.
    Hope this helps.
    Ryan

  • How to create own event of sending email for IDI

    Hi Gurus,
    We have one requirement to navigate the screen to inbox once the user sends the email. Currently the screen goes back to initial incoming email screen after user clicks the send button.
    I added the event ZSENDEMAIL in IDI event repository (CRMC_IC_EVENT_REP) with below parameters:
    component: CRMCMP_CCS_EML
    view: CRMCMP_CCS_EML/MAILBODY
    UI event: SENDMESSAGE
    Also I created a IDI policy in IC_manager as below:
    if current event = ZSENDEMAIL
    navigate to IC webclient inbox:display
    However, it did not work. The screen still goes back to the initial incoming email screen. Did anyone have any similar expenrience? Could you help to share your successful example? Any suggestion or idea are welcome!
    Thanks in advance!
    Edited by: Zhijie Kong on May 31, 2011 11:12 PM

    Hi Hannes,
    I used below IDI rule to navigate to IR screen.
    (If Current Event Equals Contact Ended and
    MEDIA Equals "Email"
    Then Navigate To ( Navigation Object type:Action = Interaction Records:Edit ) )
    Thanks,
    ZJKong

  • Iphone 4s in settings can't access Notes or Mail.  Also can't access mail from home screen. Can't send email. All else is good.

    I need help. I have reset my iphone. I have turned it off then on. Still can't launch my built in mail app from home screen. When I try it goes to blank page then right back to home screen view.
    In settings for the iphone 4s I can not access Notes or Mail, Contacts,Calendars. When I tap either of the two they highlight in blue and then go right back to Home Screen view. I seem to be able to access everything else in settings with no trouble.
    From home screen I have no trouble I can launch the built in utility Notes with no problem. I also can launch Calendars from Home Screen view. My Contacts are still reachable by tapping Phone from H/S view then clicking on contacts.
    I can not launch mail. nor can I send email. Also the built in mail app is not showing it is recieving mail either. All else seems fine.
    I can log in to my email from Safari on iphone and from my laptop with no problem.
    Anyone have any suggestions?  My iphone is out of warranty. Apples only suggestions are To pay for support.
    Thanks in advance

    Just had a thought....was trying to rememberif anything changed last night. I think I installed a mac OS X Security update. That's about the time the trouble started. Any ideas? Thanks.

  • After updating to the current versions of Adobe, I can no longer scan and send emails.

    After updating to the current versions of adobe, I can no longer scan and send emails nor can I open an attachment upon receiving an email.

    Capt Camo wrote:
    After updating to the current versions of adobe...
    What exactly is "adobe"?  Adobe is the name of a company that has hundreds of software products, each with a distinct name.
    You are posting in the Flash Player forum; do you really receive emails with Flash attachments?
    Flash Player also cannot scan or send emails.
    Finally you give no information regarding your operating system, email client, etc.

  • Have just installed iPhoto'11. Tried to send email direct from iphoto    o, but it would not except my password, or current server.

    Tried to send email direct from iphoto on my newly installed iPhoto '11. It will not accept my current and only server, or my password. The photos will go out directly from email, but not from iPhoto. Any suggestions?

    In the iPhoto preferences set Apple mail as the e-mail client and use it as before
    LN

  • My Iphone  won't receive or send email, "data communication cannot be established since a call is currently active"

    Suddenly my phone will not receive or send email.  It tells me that "data communication cannot be established since a call is currently active"  It is burning the battery like crazy. 

    Drove to the nearest Verizon store after work, not close by either.  Unbelievably simple, he removed all of the gmail info as if it never excisted, put it back in and viola...everything works.   Cancelled my Genuis Bar appt for Monday as all is working.  Why the other Verizon guy couldn't help me over the phone is beyond my comprehension. 
    Thanks for all of your help.  It has been rather stressful especially not being able to swipe credit cards.
    For what it's worth, this fellow told me if I have trouble like this again to eliminate the gmail account on the iphone and install the google app which he said works much better than the email app that came with the phone. 
    Best wishes.

  • Cannot send email from MobileMe account

    Apple recently pushed out an update to the MobileMe calendar. Since upgrading my account, I am unable to send emails from Firefox4 (current version) in Windows. The page sits indefinitely at a loading screen. Apple Support won't help because it isn't an issue with Safari. Anyone else have this issue?

    When using the MobileMe account preset to create the account, the SMTP server is created with 587 as the SMTP server port, which can't be changed when using the MM account preset to create the account.

  • Cannot send email using SharePoint designer 2013 workflow

    I am having a problem which I see many others have also posted about.  However, I don't find that any of their solutions fixes my problem.
    Using SharePoint 2013 on Windows 2008 R2 server.  SQL 2008 R2 on separate server.  Created a pretty simple workflow that calls for an email to be sent.  Created an Infopath form that is published to a SharePoint list.  One of the
    list fields is called "Approver" and is a people lookup field.  The workflow assigns an approver based on certain criteria in the list, and then sends an email to the assigned approver.
    During the testing phase of creating the workflow, I had the email sent to me specifically and I received the emails with no problems.  When I change the email recipient to Current Item:Approver (who is also me), I don't receive the email.  I have
    tried selecting Display Name, Email Address, and Login Name, but none work.  I also tried to send the email to the current item:creator (which was me) by selecting "User who created current item" from the select users dialog.  This also
    doesn't work.  The workflow is shown in a suspended state in the Workflow status screen.
    For informational purposes, I also included the Approver Display Name, the Approver Email Address and the Approver Login Name in the body of the email so that I could see what those fields actually returned as data.  The display name, and email address
    are correct, but the login name returned i:0#.w|domain\login (domain and login were my actual domain and login name).
    I have tried several of the fixes I found online to resolve this, but none have worked. Any help is appreciated.

    I don't see that it is possible to add CurrentItem:Creator to a list view.  The CurrentItem:CreatedBy returns my name as it should.  However, this does not help with my problem.  I don't want the email to come to me.  I want it to go
    to the CurrentItem:Approver.  This is a specific person who is assigned by the workflow based on various fields in the current item.  The approver is assigned, then an email is sent to the assigned person.
    There is a SharePoint group set up for Approvers.  This is used to assign permissions to the site where this list is created.
    Basically, I can't send an email to any recipient where I am using the current item lookup fields to populate the To: field.  I can only send email if I specifically select a person by name.

  • Sending email using CL_BCS in the background with subject line 255 chars

    Hello Gurus,
           Following is the sample code,. When I run in the foreground, I am getting the mail, with proper subject line. However my output medium type is '5-'External Send#. When I am trying to run this in my output program, it is resulting in dump.
           When I keep 'COMMIT WORK',  I am getting a dump saying tText * Invalid COMMIT WORK in an update function module.*
           When I remove this 'COMMIT WORK', I am still getting the error, saying Screen output without connection to user. (The current ABAP program "SAPLSTXC" statements could not be executed.)
          Hoping for a quick solution.
    Regards,
    Shaheen
    REPORT  Z_CL_BCS_TEST.
    * Trying classes
    DATA: send_request        TYPE REF TO cl_bcs.
    DATA: li_main_text        TYPE bcsy_text,
          lw_main_text        LIKE LINE OF li_main_text.
    DATA: document            TYPE REF TO cl_document_bcs.
    DATA: recipient           TYPE REF TO if_recipient_bcs.
    DATA: sender              TYPE REF TO if_sender_bcs.
    DATA: l_mtitle            LIKE sodocchgi1-obj_descr.
    DATA: sent_to_all         TYPE os_boolean.
    DATA: bcs_exception       TYPE REF TO cx_bcs.
    DATA: lv_sub TYPE string.
    TRY.
    *     -------- create persistent send request ------------------------
        send_request = cl_bcs=>create_persistent( ).
    *     -------- create and set document---------------
    *     Email title
        l_mtitle = 'attachment'.
        lv_sub = 'Email Title : I want to try for a subject which is more than 50 chars. will this work?'.
        CALL METHOD send_request->set_message_subject
          EXPORTING
            ip_subject = lv_sub.
    *     Fill the body of the mail
        REFRESH li_main_text.
        lw_main_text = 'This is test email'.
        APPEND lw_main_text TO li_main_text.
        CLEAR: lw_main_text.
        lw_main_text = 'Regards'.
        APPEND lw_main_text TO li_main_text.
        CLEAR: lw_main_text.
    *     Create Email Object
        document = cl_document_bcs=>create_document(
          i_type    = 'RAW'
          i_text    = li_main_text
          i_subject = l_mtitle ).
    *     Add document object to send request
        send_request->set_document( document ).
    *     add recipient (e-mail address)
        recipient =
            cl_cam_address_bcs=>create_internet_address(
                  'Shaheen.Taori at solvay.com' ).           " changed the email id purposefully
    *     Add recipient object to send request
        CALL METHOD send_request->add_recipient
          EXPORTING
            i_recipient = recipient
            i_express   = 'X'.
    *     ---------- send document ---------------------------------------
    *    sent_to_all = send_request->SEND_WITHOUT_DIALOG( I_WITH_ERROR_SCREEN = ' ').
        CALL METHOD send_request->SEND_WITHOUT_DIALOG.
    *      EXPORTING
    *        e_sent_to_all = 'X'.
    *    IF sent_to_all IS INITIAL.
    *      MESSAGE 'Erorr while sending email ' TYPE 'E'.
    *      EXIT.
    *    ENDIF.
          COMMIT WORK.
    *   exception handling
      CATCH cx_bcs INTO bcs_exception.
        MESSAGE i865(so) WITH bcs_exception->error_type.
    ENDTRY.

    Try using method SEND instead of SEND_WITHOUT_DIALOG.
    Also try calling method SET_SEND_IMMEDIATELY before calling method SEND.
    Use below code lines,
    send_request->set_send_immediately( i_send_immediately = 'X' ).
    sent_to_all = send_request->send( i_with_error_screen = 'X' ).   " Instead of CALL METHOD send_request->SEND_WITHOUT_DIALOG.

  • Blackberry curve 8520 using gmail - can only recieve NOT send emails!! please help!!

    Hello.
    I have been using gmail on my blackberry for a month without problems,  it just comes straight to the inbox on the main screen of the phone.
    Today my Blackberry stopped sending emails but still recieves them. When I try to delete anything in the inbox, it merely gives them a "yellow" star but does not remove them.
    How can I resolve this?! I am really desperate!!
    I have tried deleting gmail account and starting again, but this does not work. Nor does asking for servicebooks.
    Any idea?
    Solved!
    Go to Solution.

    Hi and Welcome to the Forums!!
    I suggest the following steps, in order, even if they seem redundant to what you have already tried (steps 1 and 2 each should result in a message coming to your BB):
    1) Register HRT
    Homescreen > Options > Advanced Options > Host Routing Table > (it does not matter which line is current) > Register Now
    2) Resend Service Books
    KB02830 Send the service books for the BlackBerry Internet Service
    3) Batt Pull Reboot
    Anytime random strange behavior or sluggishness creeps in, the first thing to do is a battery pop reboot. With power ON, remove the back cover and pull out the battery. Wait about a minute then replace the battery and cover. Power up and wait patiently through the long reboot -- ~5 minutes. See if things have returned to good operation. Like all computing devices, BB's suffer from memory leaks and such...with a hard reboot being the best cure.
    Hopefully that will get things going again for you! If not, then you should try deleting and re-adding your BIS conduits for the affected email accounts.
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • How to use java to send emails

    Hi,
    I am having problems trying to send an email using java. No idea what is going on because it looks fine. Can anyone give any insight?
    Cheers
    Robert
    import java.awt.event.*;
    import java.awt.*;
    import java.net.*;
    import java.io.*;
    import javax.swing.*;
    * JEmail.java
    * @author Robert Venning 18/09/2005
    * @version 1.0
    public class JEmail extends JFrame implements ActionListener{
         private static final long serialVersionUID = 1L;
         final int SMTP_PORT = 25;
         JLabel fromLabel = new JLabel("From: ");
         JLabel toLabel = new JLabel("To: ");
         JLabel ccLabel = new JLabel("CC: ");
         JLabel subjectLabel = new JLabel("Subject: ");
         JTextField from = new JTextField(20);
         JTextField to = new JTextField(20);
         JTextField cc = new JTextField(20);
         JTextField subject = new JTextField(20);
         JTextArea message = new JTextArea(10,30);
         JScrollPane scrollPane = new JScrollPane(message);
         JButton send = new JButton("Send");
         public JEmail(){
              super("Email Program");
              JPanel mainPane = new JPanel();
              JPanel pane = new JPanel();
              JPanel fromPane = new JPanel();
              JPanel toPane = new JPanel();
              JPanel ccPane = new JPanel();
              JPanel subjectPane = new JPanel();
              mainPane.setLayout(new FlowLayout());
              pane.setLayout(new GridLayout(4,1));
              fromPane.add(fromLabel);
              fromPane.add(from);
              toPane.add(toLabel);
              toPane.add(to);
              ccPane.add(ccLabel);
              ccPane.add(cc);
              subjectPane.add(subjectLabel);
              subjectPane.add(subject);
              pane.add(fromPane);
              pane.add(toPane);
              pane.add(ccPane);
              pane.add(subjectPane);
              mainPane.add(pane);
              mainPane.add(scrollPane);
              mainPane.add(send);
              setContentPane(mainPane);
              send.addActionListener(this);
         public static void main(String[] args) {
              JFrame aFrame = new JEmail();
              aFrame.setSize(350, 400);
              aFrame.setVisible(true);
         public void actionPerformed(ActionEvent event){
              try{
                   PrintWriter writer = new PrintWriter(new FileWriter("log.txt"));
                   String input, output;
                   Socket s = new Socket("mail.tpg.com.au", SMTP_PORT);
                   BufferedReader in = new BufferedReader
                        (new InputStreamReader(s.getInputStream()));
                   BufferedWriter out = new BufferedWriter
              (new OutputStreamWriter(s.getOutputStream()));
                   output = "HELO theWorld" + "\n";
                   out.write(output);
                   out.flush();
                   System.out.print(output);
                   writer.println(output);
                   input = in.readLine();
                   System.out.println(input);
         //          writer.println(input);
                   output = "MAIL FROM: <" + from.getText() + ">" + "\n";
                   out.write(output);
                   out.flush();
                   System.out.print(output);
                   writer.println(output);
                   input = in.readLine();
                   System.out.println(input);
         //          writer.println(input);
                   output = "RCPT TO: <" + to.getText() + ">" + "\n";
                   out.write(output);
                   out.flush();
                   System.out.print(output);
                   writer.println(output);
                   input = in.readLine();
                   System.out.println(input);
              //     writer.println(input);
                   output = "DATA" + "\n";
                   out.write(output);
                   out.flush();
                   System.out.print(output);
                   writer.println(output);
                   input = in.readLine();
                   System.out.println(input);
              //     writer.println(input);
                   output = "Subject: " + subject.getText() + "\n";
                   out.write(output);
                   out.flush();
              System.out.print(output);
              writer.println(output);
              output = "From: Robert Venning <" + from.getText() + ">" + "\n";
                   out.write(output);
                   out.flush();
              System.out.print(output);
              writer.println(output);
                   // message body
              output = message.getText() + "\n";
                   out.write(output);
                   out.flush();
                   System.out.print(output);
                   writer.println(output);
                   output = ".\n";
                   out.write(output);
                   out.flush();
                   System.out.println(output);
                   writer.println(output);
                   output = "QUIT" + "\n";
                   out.write(output);
                   out.flush();
                   System.out.print(output);
                   writer.println(output);
                   input = in.readLine();
                   System.out.println(input);
         //          writer.println(input);
                   writer.close();
                   s.close();
              catch(Exception exception){
                   exception.printStackTrace();
    }

    Hi, floppit. For sending emails, I used the JavaMail API. Here is some code I wrote where I used JavaMail. The most relevant lines are in bold.
    /*   File:  ListenNotifier.java
    * Author:  Fabricio Machado
    *          [email protected]
    * This utility is based on the "Listen.java" tool from the Tiny OS
    * java tools package, in /tinyos-1.x/tools/java/net/tinyos/tools/.
    * The original application has been extended to convert raw packet data into
    * a more meaningful representation of actual photo sensor readings in
    * lux.
    * The application checks the readings against a user-defined
    * threshold, and sends email notifications when readings break the
    * threshold, and also when readings dip back below the threshold.
    * Currently, the code is only fit to handle packets from the Tiny OS
    * nesc application OscilloscopeRF.nc.  The code gets the packet data
    * by connecting via TCP to a Tiny OS java tool called "Serial Forwarder."
    * "Serial Forwarder" takes packets from the base station, and forwards
    * them to TCP port 9001.
    * Below is UC Berkeley's copyright disclaimer regarding the original code.
    *                              |   |
    *                              |   |
    *                              |   |
    *                              |   |
    *                            __|   |__
    *                                v
    * "Copyright (c) 2000-2003 The Regents of the University  of California. 
    * All rights reserved.
    * Permission to use, copy, modify, and distribute this software and its
    * documentation for any purpose, without fee, and without written agreement is
    * hereby granted, provided that the above copyright notice, the following
    * two paragraphs and the author appear in all copies of this software.
    * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
    * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
    * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
    * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
    * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
    * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
    * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
    * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
    * Copyright (c) 2002-2003 Intel Corporation
    * All rights reserved.
    * This file is distributed under the terms in the attached INTEL-LICENSE    
    * file. If you do not find these files, copies can be found by writing to
    * Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300, Berkeley, CA,
    * 94704.  Attention:  Intel License Inquiry.
    import java.util.Properties;
    import java.io.*;
    import java.net.*;
    import net.tinyos.packet.*;
    import net.tinyos.util.*;
    import net.tinyos.message.*;
    import javax.mail.internet.*;
    import javax.mail.*;
    import java.util.*;
    public class ListenNotifier{
        public static void main(String args[]) throws IOException, MessagingException {
         int i;
         int j = 0;
         Integer threshold=0;
         String to="";
         String timeStamp;
         // Check to see if user is running the program correctly.
         // If -T option is not used, a default value of 250 lux is
            // set as threshold . . .
         switch (args.length){
         case 0:
               System.err.println("usage: java ListenNotifier < EmailAddress1 > <  EmailAddress2 > . . .  -T < Threshold >\n");
               System.exit(2);
               break;
         case 1:
             to = args[j];
             threshold = 250;
             break;
         default:
             if (args[args.length-2].equals("-T")){
              threshold = threshold.valueOf(args[args.length-1]);
              to = args[0];
              while(!args[j+1].equals("-T")){
                  to = to + " " + args[j+1];
                  j++;
              break;
             else{
              j = 0;
              threshold = 250;
              to = args[j];
              while((j + 1) < args.length){
                  to = to + " " + args[j+1];
                  j++;
              System.out.printf("Mailing list is: %s\n", to);
              break;
         // Connect to the Serial Forwarder on TCP port 9001 . . .
             PacketSource reader = BuildSource.makeSF("192.168.0.12",9001);
         // Check to see if connection to Serial Forwarder successful . . .
         if (reader == null) {
             System.err.println("Invalid packet source (check your MOTECOM environment variable)");
             System.exit(2);
         try {
             // Use JavaMail API methods to set up an
             // email session . . .
          Properties props = System.getProperties();
         Session session = Session.getInstance(props, null);
         javax.mail.Message message = new MimeMessage(session);
             // Open the packet source . . .
             reader.open(PrintStreamMessenger.err);
             // Set a threshold boolean to be used so
             // email is sent only once after threshold
             // is exceeded.
             Boolean limit = false;
             for (;;) {
              // The node ID field in the OscilloscopeRF packet
              // is 2 bytes long, but all byte pairs in the packet
              // are in little endian order.  Thus, the bytes must
              //  be re-ordered.  They are then converted to unsigned
              // integers and added together to obtain the node ID.
              byte[] packet = reader.readPacket();
              Integer nodeID = (( int ) packet[5] & 0xFF) + ((( int ) packet[6] & 0xFF)<<8);
              System.out.printf("Packet from node %d . . . \n", nodeID);
              // Begin extracting data payload of sensor readings,
                    // which are stored in the last 20 bytes of the packet . . .
             for (i = 0; i <= 9; i++){
              // Convert reading to integer, display on screen . . .
              Integer sensorData = (( int ) packet[(2*i)+11] & 0xFF) + ((( int ) packet[(2*i)+12] & 0xFF)<<8);
              System.out.printf("Sample %d reading at %d lux.\n", i+1, sensorData);
              // Is sensor reading  above limit?
              if(!limit && (sensorData >= threshold)){
                  limit = true;
                  System.out.printf("WARNING: SENSOR READING ABOVE THRESHOLD--SENDING NOTICE BY TEXT MESSAGE.\n");
                  // Compute a time stamp for when threshold was exceeded.
                  java.util.Locale locale = Locale.getDefault();
                  java.text.DateFormat dateFormat = java.text.DateFormat.getDateTimeInstance(java.text.DateFormat.LONG,
                                                                  java.text.DateFormat.LONG, locale);
                  timeStamp = dateFormat.format(new java.util.Date());
                  // Build message and send to recipients in mailing list . . .
                  message.setFrom();
              message.setRecipients(javax.mail.Message.RecipientType.TO, InternetAddress.parse(to, false));
              message.setSubject("WARNING: NODE " + nodeID.toString() + " SENSOR READING ABOVE THRESHOLD!");
              message.setText("Node " + nodeID.toString() + " sensed " + sensorData.toString() + " lux on " + timeStamp + "\n");
              Transport.send(message);
                  System.out.printf("%s\n",timeStamp);
              //  Has sensor reading now dropped from above threshold to below threshold?
              //  Same concept as before . . .
              if(limit && (sensorData < threshold)){
                  limit = false;
                  System.out.printf("READING BELOW THRESHOLD AGAIN . . . SENDING NOTICE BY TEXT MESSAGE.\n");
                  java.util.Locale locale = Locale.getDefault();
                  java.text.DateFormat dateFormat = java.text.DateFormat.getDateTimeInstance(java.text.DateFormat.LONG,
                                                                  java.text.DateFormat.LONG, locale);
                  timeStamp = dateFormat.format(new java.util.Date());
                  message.setFrom();
              message.setRecipients(javax.mail.Message.RecipientType.TO, InternetAddress.parse(to, false));
              message.setSubject("NODE " + nodeID.toString() + " READING BELOW THRESHOLD AGAIN.");
              message.setText("Node " + nodeID.toString() + " sensed " + sensorData.toString() + " lux on " + timeStamp + "\n");
              Transport.send(message);
                  System.out.printf("%s\n",timeStamp);
             System.out.println();
             System.out.flush();
         // Catch IOException from Tiny OS java method, and
         // MessagingException from setRecipients method in JavaMail API . . .
         catch (IOException e) {
             System.err.println("Error on " + reader.getName() + ": " + e);
         catch(MessagingException e){
         System.err.println("Error in javax.mail.message.setRecipients:\n" + to);
    }

  • Cannot send email from the Mail App?

    I've had an izymail subscription for 1 year and just renewed it last week. I could never send an email from my Mail App without a window popping up stating "izymail cannot connect to the server" and the sending bar (along the bottom of the screen) just freezes and will not send.
    I've a Hotmail account linked up to izymail. Anyone know how to fix this problem?

    I fixed my problem - I deleted my email account on my iPhone, then tried to setup a new account. I had a few problems setting it up. It wouldn't recognize the incoming or outgoing servers and I lost my email altogether for a few hours. Then I changed every setting possible and finally figured out that I had 2-3 "Other SMTP Servers" as well as my "Primary Server". Once I deleted the Other SMTP Servers, my email worked and i'm able to send emails now!
    I also think changing the "Server Port" number helped solve my problem also, and making sure "Use SSL" was turned off.

  • Cannot send email from iPhone5--calendar syncing issues also

    I have an iPhone 5 and am not currently using iCloud.  I have 3 email accounts. 
    The first is a yahoo email account--and it both receives & sends emails just fine. 
    I use Outlook for the other two email accounts (one is an IMAP and the other is a POP).  Both receive email, but I cannot send out emails from my iPhone.  When I try to send an email from either account, I get this message: 
    "A copy has been placed in your Outbox.  The sender address "[address I used]" was rejected by the server.
    Also, I don't know if it is related, but my iPhone calendar isn't syncing with Outlook.  I add an appointment on my iPhone or in Outlook, and it won't appear in the other location (Outlook/iPhone). 
    Thanks for your help. 

    Check your settings, maybe the mail index is at fault.
    Setup Wizard and troubleshooting tips:
    http://www.apple.com/support/mail
    Also has a link to Mail community section.

Maybe you are looking for

  • HOW CAN I DELETE AN EVENT WITHOUT  HAVING TO SELECTING IT FROM THE LIBRARY?

    I have a big problem. I want to delete an entire event from my library because everytime I select it imovie freezes and then close itself up. So I have to re-open imovie again. And when I want to select that particular event again the same problem oc

  • Why is the name on the email different to the name in my contacts

    On the top of an email may friends name is spelt wrong ie. Janey (then email address) insted of Janet (then email address).  In my contacts on my mac and my phone it is spelt correctly.  How can this be and how can i fix it. I thought it was because

  • Zen Firmware wishl

    Ok I just got the new Zen yesterday which I absolutely love.So I decided to make my own little firmware wishlist.You can add to it if you want and I'll edit my thread. I realize some are more realistic than others, but they are all possible. I have t

  • Help - I don't want to trigger an event!!

    public void tableChanged( TableModelEvent event ){   int row = event.getFirstRow();   int area = c.area(input);   if(table.getValueAt(row,QUANTITY) != null){     table.setValueAt(""+area,row,SUBTOTAL); //This causes an infinite loop!  I don't want it

  • What is causing my print jobs to fail?

    Having trouble printing  documents (which range from 12-50 pages) from InDesign CC. Whole job fails to print. Started with new documents based on template created in CC. Trouble fonts have been removed from styles. I can print some individual pages.