Variables to mail

Hi,
I have constructed a form which collects information over a
series of "pages". The input is held as _global variables and is
then used to create a financial quote for services. So far all
*seems* to be working OK. However, I am now, officially, Out Of My
Depth.
I need to send a copy of the information plus quote to both
my client and the browser and I have No Idea how to do it.
Can anyone offer any advice or perhaps a URL for a tutorial?
I have a very basic knowledge of PHP and this is the route I would
like to take if possible.
Thanks in advance!!
Pylo

Lee Brimelow has a nice tut on this here:
http://www.gotoandlearn.com

Similar Messages

  • How to print value of the variable in mail

    Hi,
    I am new to workflow and trying out some basis small work.
    i have created workflow for material change.
    whenever a material is changed mail is sended to user.
    it is working fine .
    but now i want that material number which is changed should come in mail.
    how can i achive this
    Thanks,
    Chintan

    Hi Soni
    You have the "Materialnumber" field in the event container. Pass this into the workflow container by defining a Workflow Container element and subsequently use this container as a variable in your email using insert fields option and you will have the Materialnumber visible in your mail sent.
    NB. This message is more or less a cut and paste from an other answer in this forum. So sometimes the fastet way to get an answer, is to search instead of posting questions. Just a kind reminder |
    Kind regards
    Mikkel

  • %%variable%% in mail templates

    Hi, I'd like to send more information like order number, etc with the e-mail confirmation for
    "order waiting for approval"
    "order approved"
    I took the variables from the Invoice Template like %%OrderID%%  %%FirstName%% %%LastName%%  %%UserID%% and pasted them in
    orderapproved, ordershipped, submitforapproval  but all I can get is gibberish when I receive the e-mail. any help ?
    By the way, what is reminderemail for and %%Message%%  ??
    thank you much, Daniel

    Hi Daniel,
    The %% variables available for templates is dependant upon the objects they are bound to.
    The orderapproved template is bound to NPCommunicationLog.
    The ordershipped template is bound to NPShipment.
    The submitforapproval is bound to NPCommunicationLog.
    The fields available in these objects can be found in the Webtools API documentation.

  • Send User Variables via Mail with Captivate 7

    Hello,
    I am looking for a way to send some self difined user Variables via e-Mail?
    I only find solution for Quizes, but i´d like to have some of the Additional Viables als well.
    Is there a Way?
    Best Regards
    Bernhard

    You'll need JavaScript. In his video tutorials about JS for Captivate, Jim Leichliter explains the work flow:
    http://captivatedev.com/2014/01/02/javascript-video-series-adobe-captivate-7/
    Lilybiri

  • How to send long text  in a mail using FM : SO_NEW_DOCUMENT_SEND_API1

    Hi All,
    In my BSp application user can enter long text   ( can be more than 300 char ) in TextEdit.
    problem is as below:
    1) i am getting all the text in oninput processing ...
    2) using the FM READ_TEXT to   get mail template built in SO10.
    3) Replacing all dynamic variables in mail template with user enterd text.
    4) then passing the data to FM SO_NEW_DOCUMENT_SEND_API1.  this FM has table parameter with 255 char ( please check once )
    i am able to send the data  in mail.   But long text more than 256 char is not comming as single paragraph.
    For expamle  ...user enter the following  text in text edit.
    Responsible for the development, implementation, and maintenance of human resource information systems (HRIS) associated with the collection, retrieval, accessibility, and usage of employee information for Human Resource department planning and activities.  Maintains internal database files and tables, and develops custom reports to meet the requirements of Human Resource management and staff.
    in inbox i am getting as below:
    Job Description for    : Responsible for the development, implementation, and maintenance of human resource information systems (HRIS) associated with the collection, retrieval, accessibility, and usage of employee information for Human Resource depa
      Maintains internal database files and tables, and develops custom reports to meet the requirements of Human Resource management and staff.
    Job Description for is fixed text from SO10 templete.   and  remainning text is user text.
    some data is missing in mail.
    SO10 template  is as below  :
    Job Description for : &INSTRUC1&
    &INSTRUC2&
    help to solve the above issue.
    Regads,
    Kishan
    Edited by: kishanrao.sap on Oct 11, 2010 3:12 PM

    Hi Krishna,
      Please use the object_type parameter of tthe FM as 'HTM'.
    Then divide the text by append them into the lines of the object_content. In the begining and end make sure you have
    <p> --  in the begining
    </p>-- in the end
    if i want to type the text in one para " My name is Imran and i am an ABAP developer".
    CLEAR: WA_OBJECT_CONTENT.
      WA_OBJECT_CONTENT-line = '<html>'<body><p> My name is Imran.
      APPEND WA_OBJECT_CONTENT TO T_OBJECT_CONTENT.
    CLEAR WA_OBJECT_CONTENT.
      WA_OBJECT_CONTENT-line = ' and i am an ABAP developer</p></body><html;>'.
      APPEND WA_OBJECT_CONTENT TO T_OBJECT_CONTENT.
    Hope this helps you.
    Regards
    Imran.

  • Dynamically pass subject via mail adapter without using mail package

    Hi,
    We have requirement to pass the Dynamic variable as Mail subject
    we can't use Mail Package as we need to capture the data from Dynamic SOAP header Data from incomming channel
    Dynamic SOAP Header variable (XHeaderName1) comming from Sender SOAP channel.
    Receiver side we need to capture that XHeaderName1 in Mail Adapter channel using ASMA and Variable transport binding so that value of XHeaderName1 should overwrite Subject under General/ Mail Atribute section.
    Could you please let me know, how to handle this requirement using module configuration?
    Also suggest the correct configuration to use ASMA and Variable transport binding.
    Regards
    Venky

    Hi Venky,
    Please have a look at the links below. They should help you.
    Configuring the Sender SOAP Adapter- https://help.sap.com/saphelp_nw04/helpdata/en/fc/5ad93f130f9215e10000000a155106/content.htm
    Configuring the Receiver Mail Adapter-https://help.sap.com/saphelp_nw04/helpdata/en/6b/4493404f673028e10000000a1550b0/content.htm
    Adapter-Specific Message Attributes in the Message Header  -https://help.sap.com/saphelp_nw04/helpdata/en/43/0a7d1be4e622f3e10000000a1553f7/content.htm
    Regards,
    Jannus Botha

  • How to a session variable in another initialisation block?

    Hello all,
    I think I overlook something. So hope someone please can help me out.
    I have 2 initialisation blocks.
    The first one has as a source a LDAP server.
    Now I fill a session variable called mail by the LDAP server.
    When I click on test I will see my mail address.
    lets say I see [email protected]
    No I want to do something with that subdomain.
    So I made a new initialisation block with the database as the source.
    And made a query
    select case when upper(:mail) like 'subdomain%' then A else 'NO Domain found' END from dual
    but this doesn't work, and really don't understand why!! (and ofcourse I am using the executed precendence option to initialise first the other initaialisation block)
    also when I change the query in:
    select case when upper('[email protected]') like 'SUBDOMAIN%' then A else 'NO Domain found' END from dual
    then it al works fine..
    Hope anyone can help me out!!
    Best regards,
    Remc0

    Does the Init Block really fails? Could you please set the logging level to 2 in that user and review both the NQuery and Presentation Services log files? Can you try with a simply select statement:
    SELECT upper(VALUEOF(NQ_SESSION.MAIL)) FROM DUAL
    to make sure the new variable is getting initialized? It could be that the value from the LDAP server has trailing or leading spaces?
    Also I don't see why you need to put the domain on another session variable, you could do your filter using the case statement directly. Unknown to many a CASE statement can be used in a WHERE clause as well. Sample SQL:
    WHERE COLUMN = (case when upper(VALUEOF(NQ_SESSION.MAIL)) like '%SUBDOMAINY%' then 'SUBDOMAINY' else 'NO Domain found' END)

  • Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException

    Hello everyone ... sorry for my English but I am an Italian boy with a problem that is not answered.
    I had to create a web application-service (created in Java with NetBeans 6.7) which is connected to a database postgresql (8.3.5) and for connection to the server using tomcat (3.2.4) through SOAP messages (2_2).
    OPERATING SYSTEM: WINXP
    I have created classes ... I created the database ... completed the project in NetBeans without any errors ... implemented the necessary libraries in the project (also ).... 8.3.604.jar jdbc tomcat configured and soap ... .. and set the environment variables (soap, mail, send in xerces )...... run the application on the NetBeans appears the login screen of my web service .....
    enter username and password (exactly!) and the NetBeans gives me an Exception:
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
            at Intro.loginActionPerformed(Intro.java:522)
            at Intro.access$100(Intro.java:21)
            at Intro$2.actionPerformed(Intro.java:111)
            at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
            at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
            at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
            at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
            at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
            at java.awt.Component.processMouseEvent(Component.java:6263)
            at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
            at java.awt.Component.processEvent(Component.java:6028)
            at java.awt.Container.processEvent(Container.java:2041)
            at java.awt.Component.dispatchEventImpl(Component.java:4630)
            at java.awt.Container.dispatchEventImpl(Container.java:2099)
            at java.awt.Component.dispatchEvent(Component.java:4460)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
            at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
            at java.awt.Container.dispatchEventImpl(Container.java:2085)
            at java.awt.Window.dispatchEventImpl(Window.java:2475)
            at java.awt.Component.dispatchEvent(Component.java:4460)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Java Result: 1
    BUILD SUCCESSFUL (total time: 31 seconds)  The line 522 Intro class is as follows:
    private void loginActionPerformed(java.awt.event.ActionEvent evt) {                                     
            try {
                URL address= new URL("http://"+ip+":8080/soap/servlet/rpcrouter");
                //Costruzione della chiamata
                Call chiamata = new Call();
                chiamata.setTargetObjectURI("urn:server");
                chiamata.setMethodName("controllaAgenzia");
                chiamata.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
                //creazione parametri che dovro' passare al soap
                Vector<Parameter> params = new Vector<Parameter>();
                String u = user.getText();
                String p = String.valueOf(password.getPassword());
                params.addElement(new Parameter("user", String.class, u, null));
                params.addElement(new Parameter("password", String.class, p, null));
                chiamata.setParams(params);//parametri passati al soap
                try {
                    //Invocazione RPC
                    Response respons = chiamata.invoke(address, "");
                    //qui ho la risposta inviata dal server
                    *Parameter par = respons.getReturnValue();*
                    Object value = par.getValue();
                    String REP = String.valueOf(value);
                    System.out.println(REP);
                    if (REP.equals("ACK_agenzia")) {
                        new MainAgenzia(ip);
                        this.dispose();
                    } else if (REP.equals("NACK_agenzia")) {
                        JOptionPane.showMessageDialog(null, "I dati inseriti non sono corretti", "Errore", JOptionPane.ERROR_MESSAGE);
                        password.setText("");
                        user.setText("");
                    } The strange thing is that this web service was running just finished the project.
    After 4-5 days of its operation has stopped, creandomi this problem.
    I think the answer is, the server that is not the case.
    I thought all I thought was jdbc, but I can connect to the database, so I do not know what to do and how to proceed.
    thanks to all, and thanks to my translator. :P

    Parameter par = respons.getReturnValue();There is only one possible reason, "respons" is null.

  • Error executing filter in query using a Collection as a parameter

    Hi,
    I am getting a null pointer exception when executing my query. When it
    gets to Kodo it looks like the following:
    Filter -
    ((emailView._email._text.ext:stringContains(keyword)
    || emailView._email._subject.ext:stringContains(keyword))
    && (folders.contains(emailFolder) &&
    emailFolder._views.contains(emailView)))
    variables - com.mail.data.EmailView emailView;com.mail.data.EmailFolder
    emailFolder;
    ordering - (there is no ordering)
    imports - import java.util.Collection;import
    com.mail.data.EmailFolder;import com.mail.data.EmailMessage;
    parameters - java.lang.String keyword,java.util.Collection folders
    class/extent - com.mail.data.EmailView
    Basically I am trying to get all the EmailViews that contains an
    EmailMessage whose text or subject contains a keyword. The views
    returned should only be contained in certain folders which are passed as
    a parameter.
    So my object model is like this:
    EmailFolder -- 1 to many --> EmailView -- 1 to 1 --> EmailMessage
    I tried the following filter first which works:
    (_email._text.ext:stringContains(keyword)
    || email.subject.ext:stringContains(keyword))
    But when I try filtering with the folders it throws a
    NullPointerException. The folders passed to the filter are valid, and
    contain valid EmailViews, and those EmailViews contain valid
    EmailMessages that have non-null text and subject fields.
    The following is the relevant part of the stack trace:
    javax.jdo.JDOUserException: The given filter/ordering String
    "((emailView._email._text.ext:stringContains(keyword) ||
    emailView._email._subject.ext:stringContains(keyword)) &&
    (folders.contains(emailFolder) &&
    emailFolder._views.contains(emailView)))" is not valid. Make sure all
    parentheses are properly matched and that the filter uses proper Java
    syntax.
    NestedThrowables:
    java.lang.NullPointerException
    at com.solarmetric.kodo.query.FilterParser.evaluate(UnknownSource)
    at
    com.solarmetric.kodo.query.QueryImpl.getExpression(UnknownSource)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCQuery.getExpression(UnknownSource)
    at
    com.solarmetric.kodo.query.QueryImpl.executeWithMap(UnknownSource)
    at
    com.solarmetric.kodo.query.QueryImpl$SynchronizedQuery.executeWithMap(Unknown
    Source)
    NestedThrowablesStackTrace:
    java.lang.NullPointerException
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCExpressionFactory$PathImpl.<init>(Unknown
    Source)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCExpressionFactory.getPath(Unknown
    Source)
    at com.solarmetric.kodo.query.FilterParser.eval(Unknown Source)
    at com.solarmetric.kodo.query.FilterParser.getValue(UnknownSource)
    at com.solarmetric.kodo.query.FilterParser.eval(Unknown Source)
    at com.solarmetric.kodo.query.FilterParser.getValue(UnknownSource)
    at com.solarmetric.kodo.query.FilterParser.eval(Unknown Source)
    at
    com.solarmetric.kodo.query.FilterParser.getExpression(UnknownSource)
    at com.solarmetric.kodo.query.FilterParser.eval(Unknown Source)
    at
    com.solarmetric.kodo.query.FilterParser.getExpression(UnknownSource)
    at com.solarmetric.kodo.query.FilterParser.eval(Unknown Source)
    at
    com.solarmetric.kodo.query.FilterParser.getExpression(UnknownSource)
    at com.solarmetric.kodo.query.FilterParser.evaluate(UnknownSource)
    at
    com.solarmetric.kodo.query.QueryImpl.getExpression(UnknownSource)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCQuery.getExpression(UnknownSource)
    at
    com.solarmetric.kodo.query.QueryImpl.executeWithMap(UnknownSource)
    at
    com.solarmetric.kodo.query.QueryImpl$SynchronizedQuery.executeWithMap(UnknownSource)
    Thanks in advance,
    Khamsouk

    As the exception said, this is not a valid query string.
    What happens if you do:
    folders.contains(emailFolder) &&
    emailFolder._views.contains(emailView) &&
    (emailView._email._text.ext:stringContains(keyword) ||
    emailView._email._subject.ext:stringContains(keyword))
    The point here is that a 'relation.contains(var)' statement must be
    followed by '&& something that uses the var'.
    -Fred
    Khamsouk Souvanlasy <[email protected]> wrote:
    Filter -
    ((emailView._email._text.ext:stringContains(keyword)
    || emailView._email._subject.ext:stringContains(keyword))
    && (folders.contains(emailFolder) &&
    emailFolder._views.contains(emailView)))
    variables - com.mail.data.EmailView emailView;com.mail.data.EmailFolder
    emailFolder;--
    Fred Lucas
    SolarMetric Inc.
    202-595-2064 x1122
    http://www.solarmetric.com

  • Need Urgent help--Display image as background of an email

    Dear All,
    Iam new to Java mail API.
    Someone please let me know if it is possible to make an image display as a background of an email using java mail.
    I had tried using below code.
    //code
    message.setContent( "<html><body><table width=\"100%\" height=\"90%\" border=\"0\" cellspacing=\"0\" cellpadding=\"20\" background=\"https://ttslemc.tatatel.co.in/EMC_FEEDBACK/imagepool/indicom_logo.jpg\"><tr><td>
    "+ content+ "
    </td></tr></table></body></html>",
    "text/html");
    //here content is a variable containing mail content captured from a html text area
    //code
    This is displaying me the image but the content formatting is lost.Everything appears in single line.
    Is it possible to have a background image and the content formatted properly for a html mail using java mail api.
    Please help me.....ASAP

    First, realize that how a message is displayed is up to the message reader being used.
    You can't control it, you can only provide suggestions.
    Using html text with a reference to an external image is a good start. I don't understand
    what you mean when you say "the content formatting is lost". Is none of the html formatting
    having any effect? Are you seeing the raw html instead of the formatted text?

  • Clarification on bash initilization file/paths

    I need some clarification on bash initilization file/paths for general solaris user.
    i created user by useradd -d /export/home/philip -m -s /usr/bin/bash -c "Philip Brown" philip
    so I get a bash shell when logged in. ok - good.
    I look in my home folder for a .profile file and view this in gedit
    :content of file:
    #     This is the default standard profile provided to a user.
    #     They are expected to edit it to meet their own needs.
    MAIL=/usr/mail/${LOGNAME:?}
    :eof:
    when I execute "env" I see my path as the following
    PATH=/usr/bin:/usr/openwin/bin:/usr/ucb
    therefore, is it not actually using my .profile file.
    I can't understand which file is it using and have looked everywhere.
    Please advise.
    kind regards

    Bash is basicly an "extension" in some sort. Added due to popular demains but not fully / officially supported by Solaris just yet. Also see /etc/profile which does have some specific options with regards to settings but nothing specificly aimed at bash.
    It is a bit odd though since bash(1) claims in its manpage to use /etc/profile, ~/.bash_profile, ~/bash_login or ~/.profile. Next you have ~/.bashrc to set specific settings for bash.
    What Solaris version are you using ? Its a bit odd since on my Solaris 10 it picks up the ~/.profile perfectly. Are you sure you also used "export" to actually set the variable?
    MAIL=/usr/mail/${LOGNAME:?}
    export MAIL

  • Business Roles Provisioning - Issue

    Hi All,
    We are on GRC SP13.
    We are using business roles for provisioning.
    When i select "CHANGE ACCOUNT" request type and request for business roles through GRC, roles are being assigned to UserID and everything is working fine.
    Issue is with the notification mail user is getting after provisioning. My notification email has details as shown below.
    Hi Padmavathi Sai,
    The Request number : 453 , has been processed and the Request is Closed. The details are as follows:
    PREDDY User created in XXXXXXX
    XXXXXXXXX Business role assigned to PREDDY
    Kind regards,
    Access Control Administrator
    PREDDY UserID is already available in the target system and user selected change account request type, but notification email says that user is created
    Anyone came across this issue?
    Regards,
    Sai.

    Hi Colleen,
    I am using the standard notification template GRAC_AR_CLOSE.
    Hi %FIRST_NAME% %LAST_NAME% (%USER_ID%),
    The Request number : %REQNO% , has been processed and the Request is
    Closed. The details are as follows:
    %PROVISIONING%
    Kind regards,
    Access Control Administrator
    %PROVISIONING% variable shows mail notification as I have mentioned above
    Can you help me with this?
    Regards,
    Sai.

  • Help importing SWF / FLA contact form into FLA file.

    I've been trying to import, embed, or load a contact form into a fla flash website (i have the fla and files) however i cant seem to get it to work.
    The form is separate file, I have the fla source file for it as well.
    I'm using Actionscript 3. I would like to have the form dynamical load into my existing project/page - http://www.photorexit.com/site/contact/contact
    Here is the contact form page - http://www.photorexit.com/site/contact/contact_page.html
    any suggestions?
    -Jason

    The contact_page.fla page is a template contact file I purchased on the net.
    I spent most of the morning going through the files and I cant seem to pin point why the contact_page is trying to load contact.swf from my local computer.
    I assume it has something to do with the "contact_page" ContactPage.as file and the Monitor.as file.
    I have to admit, I'm in over my head...
    -Jason
    ContactPage.as
    package as3{
        import flash.display.Sprite;
        import flash.display.MovieClip;
        import flash.display.StageAlign;
        import flash.display.StageScaleMode;
        import flash.text.TextField;
        import flash.text.TextFieldAutoSize;
        import flash.events.Event;
        import flash.events.IOErrorEvent;
        import flash.events.MouseEvent;
        import flash.net.URLLoader;
        import flash.net.URLRequest;
        import flash.net.navigateToURL;
        import flash.utils.Timer;
        import flash.geom.ColorTransform;
        import caurina.transitions.Tweener;
        import caurina.transitions.properties.ColorShortcuts;
        ColorShortcuts.init();
        public class ContactPage extends Sprite {
            public var itemsPath:String='';
            private var xmlCOLORS_DFT:String = 'colors.xml';
            private var colorStatus:Boolean=false;
            public var color_dfr:Object=new Object();
            private var xmMAIN_XML_PATH:String = 'cgal.xml';
            private var mainXMLStatus:Boolean=false;
            public var xmlDate:Array = [];
            private var mainTitle:String='';
            private var bg:BG;
            private var monitor:Monitor;
            public var footerMenu:FooterMenu;
            private var b_colorOut:uint;
            private var b_colorOver:uint;
            public var container:MovieClip;
            public var closeF:Function;
            public var monitorHeight:int=0;
            public var monitorWidth:int=0;
            public var email_for_contact_form:String;
            public function ContactPage() {
                addEventListener(Event.ENTER_FRAME, aplLoading);
                addEventListener(Event.REMOVED_FROM_STAGE, remove);
            private function remove(e:Event):void {
                trace(this);
                removeEventListener(Event.ENTER_FRAME, aplLoading);
                removeEventListener(Event.ENTER_FRAME, loading);
                stage.removeEventListener(Event.RESIZE, appResizeHandler);
            private function aplLoading(e:Event):void {
                var bytesTotal = stage.loaderInfo.bytesTotal;
                var bytesLoaded = stage.loaderInfo.bytesLoaded;
                var percentLoaded : Number = Math.floor(Math.round( bytesLoaded/bytesTotal ));
                if (percentLoaded==1) {
                    if (parent!=stage) {
                        closeF= Object(parent).goBG;
                        container = Object(parent).div;
                        xmlCOLORS_DFT =  Object(parent).xmlCOLORS_DFT;
                        xmMAIN_XML_PATH = Object(parent).xmMAIN_XML_PATH;
                        itemsPath=Object(parent).itemsPath;
                    init();
                    removeEventListener(Event.ENTER_FRAME, aplLoading);
            public function init() {
                stage.scaleMode = StageScaleMode.NO_SCALE;
                stage.align = StageAlign.TOP_LEFT;
                stage.addEventListener(Event.RESIZE, appResizeHandler);
                footerMenu = new FooterMenu();
                monitor = new Monitor();
                bg = new BG();
                bg.alpha=0;
                addChild(bg);
                appResizeHandler();
                var mainLoader:URLLoader = new URLLoader();
                mainLoader.addEventListener( Event.COMPLETE, onMainXMLLoad );
                mainLoader.addEventListener(IOErrorEvent.IO_ERROR, errorTrace);
                mainLoader.load( new URLRequest(xmMAIN_XML_PATH) );
                var colorLoader:URLLoader = new URLLoader();
                colorLoader.addEventListener( Event.COMPLETE, onColorXMLLoad );
                colorLoader.addEventListener(IOErrorEvent.IO_ERROR, errorTrace);
                colorLoader.load( new URLRequest(xmlCOLORS_DFT) );
            public function colorCgange(obj:Object, color:uint):void {
                var colorTransform:ColorTransform = new ColorTransform();
                colorTransform.color = color;
                obj.transform.colorTransform = colorTransform;
            private function onColorXMLLoad( event:Event ):void {
                try {
                    var mainData:XML = new XML( event.target.data );
                    for (var i:int; i<mainData.elements().length(); i++) {
                        var attribCol:Object = {};
                        for each (var attribute:XML in mainData.elements()[i].attributes()) {
                            attribCol[attribute.name().toString()] = attribute.valueOf().toString();
                        color_dfr[mainData.elements()[i].name().toString()] = attribCol;
                    colorStatus = true;
                    addEventListener(Event.ENTER_FRAME, loading);
                } catch (e:Error) {
                    errorTrace("Couldn't load the Color XML file.<br/>"+e.message);
                    trace( 'Color XML Loading Error: ' + e.message );
                    return;
            private function onMainXMLLoad( event:Event ):void {
                try {
                    var mainData:XML = new XML( event.target.data );
                    mainTitle = [email protected]();
                    if (Boolean([email protected]())) {
                        monitorWidth = parseInt([email protected]());
                    if (Boolean([email protected]())) {
                        monitorHeight = parseInt([email protected]());
                    if (Boolean(mainData.@email_for_contact_form.toString())) {
                        email_for_contact_form = mainData.@email_for_contact_form.toString();
                    } else {
                        errorTrace("There is no e-mail address.");
                        trace( "There is no e-mail address.");
                        return;
                    for (var i:int=0; i<mainData.elements().length(); i++) {
                        xmlDate[i] = {title:mainData.elements()[i][email protected](), cont:mainData.elements()[i]};
                    mainXMLStatus = true;
                    addEventListener(Event.ENTER_FRAME, loading);
                } catch (e:Error) {
                    errorTrace("Couldn't load the Main XML file.<br/>"+e.message);
                    trace( 'Main XML Loading Error: ' + e.message );
                    return;
            private function loading(e:Event):void {
                if (mainXMLStatus && colorStatus) {
                    removeEventListener(Event.ENTER_FRAME, loading);
                    if (Boolean(color_dfr.background.color.length)) {
                        Tweener.addTween(bg,{_color:color_dfr.background.color, alpha:1, time:1});
                    } else {
                        bg.alpha=0;
                    monitor.alpha = 0;
                    footerMenu.alpha= 0;
                    addChild(monitor);
                    colorCgange(monitor.txt, color_dfr.mainTitle.textColor);
                    monitor.txt.text = mainTitle;
                    monitor.init();
                    monitor.addChild(footerMenu);
                    b_colorOver = uint(color_dfr.buttons.mouseOver);
                    b_colorOut = uint(color_dfr.buttons.mouseOut);
                    Tweener.addTween(monitor,{alpha:1,time:1});
                    Tweener.addTween(footerMenu,{alpha:1,time:1, delay:.7});
            function buttonRoll(e:MouseEvent):void {
                var button = e.currentTarget;
                switch (e.type) {
                    case "mouseOut" :
                        colorCgange(button.img,b_colorOut);
                        break;
                    case "mouseOver" :
                        colorCgange(button.img,b_colorOver);
                        break;
            public function errorTrace(txt:String):void {
                var err_txt:TextField= new TextField();
                err_txt.width = 300;
                err_txt.autoSize = TextFieldAutoSize.LEFT;
                err_txt.wordWrap = true;
                err_txt.htmlText = '<p align = "center"><font color="#ff0000" size="24">' + txt+ '</font></p>';
                err_txt.x = (stage.stageWidth-err_txt.width)/2;
                err_txt.y = (stage.stageHeight-err_txt.height)/2;
                addChild(err_txt);
            private function appResizeHandler(e:Event=null):void {
                if (container) {
                    bg.width = container.width;
                    bg.height = container.height;
                } else if(stage) {
                    bg.width = stage.stageWidth;
                    bg.height = stage.stageHeight;
    Monitor.as
    package as3{
        import flash.display.MovieClip;
        import flash.display.StageAlign;
        import flash.display.Bitmap;
        import flash.display.BitmapData;
        import flash.display.Loader;
        import flash.display.LoaderInfo;
        import flash.text.TextField;
        import flash.text.TextFieldAutoSize;
        import flash.text.TextFormat;
        import flash.events.FocusEvent;
        import flash.events.ProgressEvent;
        import flash.events.IOErrorEvent;
        import flash.events.Event;
        import flash.events.MouseEvent;
        import flash.net.URLLoader;
        import flash.net.URLRequest;
        import flash.net.URLVariables;
        import flash.net.URLLoaderDataFormat;
        import flash.net.URLRequestMethod;
        import flash.utils.Timer;
        import flash.events.TimerEvent;
        import flash.geom.ColorTransform;
        import caurina.transitions.Tweener;
        public class Monitor extends MovieClip {
            private var itemsPath:String;
            private var mainObj:Object;
            private var b_colorOver:uint;
            private var b_colorOut:uint;
            private var mainTitle:uint;
            private var itemTitle:uint;
            private var itemDescription:uint;
            private var xmlData:Array;
            private var container:MovieClip;
            private var mail:String;
            private var loader:URLLoader = new URLLoader();
            private var req:URLRequest = new URLRequest("contactPro.php");
            private var variables:URLVariables = new URLVariables();
            private var senderRpl:String="No";
            private var form_field_arr:Array=['txt_name', 'txt_phone','txt_email', 'txt_message'];
            private var form_def_cont_arr:Array=[];
            private var form_err_arr:Array=["Username Required","","Missing Field/Invalid E-mail", "Message Required"];
            public function Monitor() {
                b_close.visible=false;
                addEventListener(Event.ADDED_TO_STAGE, toStage);
            private function toStage(e:Event):void {
                mainObj = parent;
                container = mainObj.container;
                if (container) {
                    itemsPath = mainObj.itemsPath;
                    req = new URLRequest(itemsPath+"/contactPro.php");
                    b_close.alpha=0;
                    b_close.visible=true;
                    Tweener.addTween(b_close, {alpha:1, time:1});
                    mainObj.footerMenu.visible=false;
                xmlData = mainObj.xmlDate;
                mail = mainObj.email_for_contact_form;
                b_colorOver = uint(mainObj.color_dfr.buttons.mouseOver);
                b_colorOut = uint(mainObj.color_dfr.buttons.mouseOut);
                mainTitle = uint(mainObj.color_dfr.mainTitle.textColor);
                itemTitle= uint(mainObj.color_dfr.itemTitle.textColor);
                itemDescription= uint(mainObj.color_dfr.itemDescription.textColor);
                var contactFtextColor:uint = uint(mainObj.color_dfr.inoutTextField.textColor);
                var contactFbgColor:uint = uint(mainObj.color_dfr.inoutTextField.bgColor);
                var contactFbrColor:uint = uint(mainObj.color_dfr.inoutTextField.borderColor);
                ///mainObj.colorCgange(b_close.img, b_colorOut);
                mainObj.colorCgange(contactForm.mc_buttons.b_clear.img, b_colorOut);
                mainObj.colorCgange(contactForm.mc_buttons.b_submit.img, b_colorOut);
                b_close.buttonMode=true;
                b_close.addEventListener(MouseEvent.CLICK, fClose);
                b_close.addEventListener(MouseEvent.MOUSE_OVER,buttonRoll);
                b_close.addEventListener(MouseEvent.MOUSE_OUT,buttonRoll);
                contactForm.mc_buttons.b_clear.addEventListener(MouseEvent.MOUSE_OVER,buttonRoll);
                contactForm.mc_buttons.b_clear.addEventListener(MouseEvent.MOUSE_OUT,buttonRoll);
                contactForm.mc_buttons.b_submit.addEventListener(MouseEvent.MOUSE_OVER,buttonRoll);
                contactForm.mc_buttons.b_submit.addEventListener(MouseEvent.MOUSE_OUT,buttonRoll);
                item_1.autoSize = TextFieldAutoSize.LEFT;
                item_1.wordWrap=true;
                item_1.mouseWheelEnabled=false;
                item_2.autoSize = TextFieldAutoSize.LEFT;
                item_2.wordWrap=true;
                item_2.mouseWheelEnabled=false;
                item_3.autoSize = TextFieldAutoSize.LEFT;
                item_3.wordWrap=true;
                item_3.mouseWheelEnabled=false;
                textFieldFormat(item_1, itemDescription);
                textFieldFormat(item_2, itemDescription);
                textFieldFormat(item_3, itemDescription);
                textFieldFormat(title_1, itemTitle);
                textFieldFormat(title_2, itemTitle);
                textFieldFormat(contactForm.txError, itemTitle);
                contactForm.txt_name.borderColor = contactFbrColor;
                contactForm.txt_name.backgroundColor = contactFbgColor;
                contactForm.txt_phone.borderColor = contactFbrColor;
                contactForm.txt_phone.backgroundColor = contactFbgColor;
                contactForm.txt_email.borderColor = contactFbrColor;
                contactForm.txt_email.backgroundColor = contactFbgColor;
                contactForm.txt_message.borderColor = contactFbrColor;
                contactForm.txt_message.backgroundColor = contactFbgColor;
                textFieldFormat(contactForm.txt_name, contactFtextColor);
                textFieldFormat(contactForm.txt_phone, contactFtextColor);
                textFieldFormat(contactForm.txt_email, contactFtextColor);
                textFieldFormat(contactForm.txt_message, contactFtextColor);
                contactForm.txt_message.wordWrap=true;
                appResizeHandler();
                stage.addEventListener(Event.RESIZE, appResizeHandler);
            private function textFieldFormat(tField:TextField, color:uint):void {
                var format:TextFormat = new TextFormat();
                format.color = color;
                tField.defaultTextFormat = format;
            function buttonRoll(e:MouseEvent):void {
                var button = e.currentTarget;
                switch (e.type) {
                    case "mouseOut" :
                        if(button.name == "b_close"){
                            button.img.transform.colorTransform = new ColorTransform();
                        }else{
                            mainObj.colorCgange(button.img, b_colorOut);
                        break;
                    case "mouseOver" :
                        mainObj.colorCgange(button.img, b_colorOver);
                        break;
            private function fClose(e:MouseEvent):void {
                mainObj.closeF()
            public function init():void {
                var i:int=0;
                title_1.text = xmlData[0].title;
                title_2.text = xmlData[1].title;
                for (i=0; i<xmlData[0].cont.elements().length(); i++) {
                    this['item_'+(i+1)].htmlText = xmlData[0].cont.elements()[i];
                for (i=0; i<xmlData[1].cont.elements().length(); i++) {
                    form_def_cont_arr[i]=xmlData[1].cont.elements()[i];
                loader.dataFormat = URLLoaderDataFormat.VARIABLES;
                req.method = URLRequestMethod.POST;
                contactForm.mc_buttons.b_clear.buttonMode = true;
                contactForm.mc_buttons.b_submit.buttonMode = true;
                contactForm.mc_buttons.b_clear.addEventListener(MouseEvent.MOUSE_DOWN, text_field_clear);
                contactForm.mc_buttons.b_submit.addEventListener(MouseEvent.MOUSE_DOWN, sendForm);
                for (i=0; i<form_field_arr.length; i++) {
                    contactForm[form_field_arr[i]].tabIndex = i;
                    contactForm[form_field_arr[i]].text= form_def_cont_arr[i] ;
                    contactForm[form_field_arr[i]].addEventListener(FocusEvent.FOCUS_IN, onFocus);
                    contactForm[form_field_arr[i]].addEventListener(FocusEvent.FOCUS_OUT, outFocus);
                    contactForm[form_field_arr[i]].addEventListener(Event.CHANGE, txErrorCheck);
                appResizeHandler();
            private function txErrorCheck(event:Event):void {
                if (contactForm.txError.text.length>0) {
                    contactForm.txError.text = "";
            private function onFocus(event:FocusEvent):void {
                //trace('dd')
                for (var i:int=0; i<form_field_arr.length; i++) {
                    if (event.target.name==form_field_arr[i]) {
                        var text_field_index = i;
                if (contactForm[form_field_arr[text_field_index]].text==form_def_cont_arr[text_field_index]) {
                    contactForm[form_field_arr[text_field_index]].text='';
            private function outFocus(event:FocusEvent):void {
                for (var i:int=0; i<form_field_arr.length; i++) {
                    if (event.target.name==form_field_arr[i]) {
                        var text_field_index = i;
                if (contactForm[form_field_arr[text_field_index]].text=='') {
                    contactForm[form_field_arr[text_field_index]].text=form_def_cont_arr[text_field_index];
            private function text_field_clear(event:Event=null):void {
                for (var i:int=0; i<form_field_arr.length; i++) {
                    contactForm[form_field_arr[i]].text= form_def_cont_arr[i] ;
                    contactForm.txError.text='';
            private function sendForm(evt:MouseEvent):void {
                if (contactForm[form_field_arr[0]].text<=0 || contactForm[form_field_arr[0]].text==form_def_cont_arr[0]) {
                    contactForm.txError.text =form_err_arr[0];
                } else if (!isValidEmail(contactForm[form_field_arr[2]].text)) {
                    contactForm.txError.text = form_err_arr[2];
                } else if (contactForm[form_field_arr[3]].text<=0 || contactForm[form_field_arr[3]].text==form_def_cont_arr[3]) {
                    contactForm.txError.text =form_err_arr[3];
                } else {
                    variables.to_mail = mail;
                    variables.senderName = contactForm[form_field_arr[0]].text;
                    variables.senderPhone = contactForm[form_field_arr[1]].text;
                    variables.senderEmail = contactForm[form_field_arr[2]].text;
                    variables.senderMsg = contactForm[form_field_arr[3]].text;
                    req.data = variables;
                    loader.addEventListener(IOErrorEvent.IO_ERROR, phpError);
                    loader.addEventListener(Event.COMPLETE, receiveLoad);
                    loader.load(req);
                    contactForm.txError.text = 'Submitting form.';
            private function phpError(e:IOErrorEvent):void {
                trace(e.text);
                contactForm.txError.text = e.text;
            private function receiveLoad(evt:Event):void {
                if (evt.target.data.retval == 1) {
                    contactForm.txError.text ="Form submitted.";
                    Tweener.addTween(contactForm, {delay:2, onStart:text_field_clear});
                } else {
                    contactForm.txError.text="**  ERROR SENDING MAIL **";
            private function isValidEmail(email:String):Boolean {
                var emailExpression:RegExp = /^[a-z][\w.-]+@\w[\w.-]+\.[\w.-]*[a-z][a-z]$/i;
                return emailExpression.test(email);
            private function appResizeHandler(e:Event=null):void {
                if (stage) {
                    var oWidth:Number = stage.stageWidth;
                    var oHeight:Number = stage.stageHeight;
                    if (container) {
                        oWidth = container.width;
                        oHeight = container.height;
                    if (mainObj.monitorHeight>0) {
                        bg.height =  mainObj.monitorHeight;
                    } else {
                        bg.height = oHeight-20;
                    if (mainObj.monitorWidth>0) {
                        bg.width = mainObj.monitorWidth;
                    } else {
                        !container?bg.width = oWidth-20:bg.width = oWidth-140;
                    b_close.y=0;
                    b_close.x = bg.x+bg.width+5;
                    txt.width = bg.width - 50;
                    header_bg.width =bg.width-6;
                    this.y =Math.round((oHeight-bg.height)/2);
                    this.x =Math.round((oWidth-bg.width)/2);
                    mainObj.footerMenu.x= bg.width-13;
                    mainObj.footerMenu.y= bg.height-13;
                    title_1.width = bg.width-40;
                    item_1.width = bg.width-40;
                    item_2.width = bg.width/2-30;
                    item_3.width = item_2.width;
                    item_3.x = item_2.x+item_2.width+20;
                    title_2.width = bg.width-40;
                    contactForm.txt_name.width = item_2.width;
                    contactForm.txt_phone.width = item_2.width;
                    contactForm.txt_email.width = item_2.width;
                    contactForm.txError.width = item_2.width;
                    contactForm.txt_message.width = item_2.width;
                    contactForm.txt_message.x=contactForm.txt_name.x+contactForm.txt_name.width+20;
                    contactForm.mc_buttons.x = Math.round(contactForm.txt_message.x+contactForm.txt_message.width-contactForm.mc_buttons .width);
                    item_1.y = title_1.y+title_1.height+10;
                    item_2.y = item_1.y+item_1.height+10;
                    item_3.y = item_1.y+item_1.height+10;
                    if (item_2.y+item_2.height>item_3.y+item_3.height) {
                        title_2.y = item_2.y+item_2.height+10;
                    } else {
                        title_2.y = item_3.y+item_3.height+10;
                    contactForm.y = Math.round(title_2.y+title_2.height+10);

  • Script to alert when File system has passed 87% of its capacity

    Hi All
    I am new to solaris, please can you help write a script to put in a cron job to alert me via email when a file system reaches +87% ?
    Your help will be appreciated.
    regards
    F.R.

    With pleasure, see comments with# on each line.
    export TMP_MAILFILE=/tmp/fs_mail.txt *# This sets path and filename variable for mail text file*
    echo "`uname -n` - Following filesystems are using more than 80% space\n" > $TMP_MAILFILE *# Writing mail subject to the mail text file*
    df -h|egrep -v "Filesystem|:"|tr -d '%'|awk '{if($5 >= 80) print $6" "$2" "$3" "$4" "$5"%"}' >> $TMP_MAILFILE # here it takes values from df command. condition is if $5 is greate than or equal to 80%, it takes values of Filesystem name ($6), filesystem size $2, space currently used $3, space left for usage (availability) $4 and % occupied #5 and included % symbol for $5.
    LC=`wc -l $TMP_MAILFILE|awk '{print $1}'` # storing the line count of the mail text file
    if [ -s $TMP_MAILFILE ] # checking the mail text file size is not zero or blank
    then
    if [ $LC -gt 2 ] # on this condition, if line count of mail text is greate than 2, it will email the user, else, it will exit without alerting
    then
    mailx -s "`uname -n` Filesystem Alert" <email-id> (or) <mail alias from /etc/alias> < $TMP_MAILFILE # mailx is the utility/command used to send mail. -s is subject. Check "man mailx" for more details.
    fi # end loop 2
    fi # end loop 1
    Edited by: Soorya on Jun 23, 2011 2:48 AM
    Edited by: Soorya on Jun 23, 2011 2:51 AM

  • Error when using Variable Transport Binding in Sender Mail Adapter

    Hi,
    I am using the Sender Mail Adapter to receive an email, convert the attached tab delimited text file into xml and map it to an IDOC.
    I am using PayloadSwapBean and MessageTransformBean in order to do this, and this all works perfectly.
    I am now trying to access the Adapter Specific Message Attributes to retrieve the SHeaderFROM attribute from the message and map it to a field in the idoc.
    However when I check the "Variable Transport Binding" option in the Advanced tab of the mail adapter, the message no longer goes through to SXMB_MONI and I get the following error in the Java logs.
    Transmitting the message to endpoint http://sapserver:53500/sap/xi/engine?type=entry using connection AFW failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Received HTTP response code 500 : Error during parsing of SOAP header.
    Any ideas why this is happening?
    Thanks,
    Brad

    Hi Luciana,
    Honestly, I cant really remember how or if it was resolved and I was just helping out on the issue, but another consultant continued with it, so unfortunately I cant be any help on this.
    Good luck!
    Cheers,
    Brad

Maybe you are looking for