Help with EEM TCL / CLI scripting for re-direction/wccp counters

Being new with EEM scripting I wanted to see if I was on the right track and get some help to finish my idea.
Our problem I am trying to fix is our remote sites utilize pairs of Cat3650's for some routing and WCCP redirection.  We are encountering ACL denial issues causing slow down and access issues.  The fix for the issue we remove the WCCP service groups to break peering with our wan optimizers and re-insert the configuration thus re-establishing peering and restoring service.
My idea is to use a TCL scipt on a watchdog timer to parse the "sh ip wccp | inc denied (or unassign)" output for denial and unassignable error counters.  If a counter is found I wanted to create a syslog message that would then kick off a simple EEM CLI script to remove the service groups, wait 10 seconds, then re-add the service groups.  Please point me in the right direction if I am off track as I am not sure if I can use the EEM CLI for all this or since I want to retreive specific info from the sh ip wccp output if I do need to utilize TCL.  I am also unsure if the "total denied" ascii string pulled via the "sh ip wccp | inc denied" will cause issues when attempting to just pull the counter information.
sh ip wccp | inc Denied Red
        Total Packets Denied Redirect:       0
        Total Packets Denied Redirect:       0
Script thus far :
TCL
if [catch {context_retrieve "EEM_WCCP_ERROR_COUNTER" "count"} result] {
set wccpcounter 0
} else {
set wccpcounter $result
} if [catch {cli_open} result] {
error $result
} else {
array set cli $result
} if [catch {cli_exec $cli(fd) "show ip wccp | incl Denied"} result] {
error $result
} else {
set cmd_output $result
set count ""
catch [regexp {receive ([0-9]+),} $cmd_output} ignore count]
set count
set diff [expr $count - $wccpcounter]
if {$diff != 0} {
action_syslog priority emergencies msg "WCCP counters showing incremental Denied packet counts"
if [catch {cli_close $cli(fd) $cli(tty_id)} result] {
error $result
context_save EEM_WCCP_ERROR_COUNTER count
CLI
event manager applet WCCP_COUNTER_WATCH
event syslog priority emergencies pattern "WCCP counters showing incremental Denied packet counts"
action 001 cli command "enable"
action 002 cli command "config t"
action 003 cli command "no ip wccp 61"
action 004 cli command "no ip wccp 62"
action 005 wait 10
action 006 cli command "ip wccp 61"
action 007 cli command "ip wccp 62"
action 008 wait 15
action 009 cli command "clear ip wccp"
action 010 cli command "end"
Thanks for all the help

This won't work as EEM cannot intercept its own syslog messages.  However, I'm not sure why you need this form of IPC anyway.  Why not just make the Tcl script perform the needed CLI commands?
And, yes, you could use all applets here.  But since you've written the hard stuff in Tcl already, it might be best just to add the missing calls to reconfigure WCCP to that script.

Similar Messages

  • Help with newsletter PHP Mail script for mySQL / cron job

    I'm just trying to set up a PHP script to send emails as a cron job.
    It pretty much seems to work, but I can't get it to do two parts.
    The first part is to send the emails, and the second is to send a notification email to the site owner confirming that the emails have been sent.
    The script looks like:
    <?php
    include_once "connect_to_mysql.php";
    $sql = mysql_query("SELECT UserID, Firstname, Email, Newsletter_Received FROM Users WHERE Firstname='test' LIMIT 20");
    $numRows = mysql_num_rows($sql);
    $mail_body = '';
    while($row = mysql_fetch_array($sql)){
      $id = $row["UserID"];
      $email = $row["Email"];
      $name = $row["Firstname"];
      $mail_body = 'Test - please ignore';
        $subject = "Safari Awards Newsletter";
        $headers  = "From:[email protected]\r\n";
        $headers .= "Content-type: text/html\r\n";
        $to = "$email";
        $mail_result = mail($to, $subject, $mail_body, $headers);
      if ($mail_result) {
      mysql_query("UPDATE Users SET Newsletter_Received='1' WHERE Email='$email' LIMIT 20");
      } else {
    ?>
    <?php
    if ($numRows == 0) {
      $subj = "Newsletter Sent";
      $body = "The current newsletter has been sent to everyone.";
         $hdr  = "From:[email protected]\r\n";
         $hdr .= "Content-type: text/html\r\n";
         mail("[email protected]", $subj, $body, $hdr);
    ?>
    Basically with the line
    include_once "connect_to_mysql.php";
    included, it sends the emails as per the SELECT query, but does not send the 'Newsletter Sent' email.
    But if I take out that line, it obviously doesn't send the emails as per the SELECT query, but it does send the 'Newsletter Sent' email.
    Any suggestions on what might need changing in order for it to do both would be much appreciated!
    Thanks.

    Change this line -
    if ($numRows == 0) {
    to this -
    if ($mail_result) {

  • Need Help in creating Unix Shell Script for database

    Would be appreciable if some one can help in creating unix shell script for the Oracle DB 10,11g.
    Here is the condition which i want to implement.
    1. Create shell script to create the database with 10GB TB SPACE and 3 groups of redo log file(Each 300MB).
    2. Increase size of redolog file.
    3. Load sample schema.
    4. dump the schema.
    5. Create empty db (Script should check if db already exists and drop it in this case).
    6. Create backup using rman.
    7. restore backup which you have backed up.

    This isn't much of a "code-sharing" site but a "knowledge-sharing" site.  Code posted me may be from a questioner who has a problem / issue / error with his code.   But we don't generally see people writing entire scripts as responses to such questions as yours.  There may be other sites where you can get coding done "for free".
    What you could do is to write some of the code and test it and, if and when it fails / errors, post it for members to make suggestions.
    But the expectation here is for you to write your own code.
    Hemant K Chitale

  • I need help with setting up time machine for backup

    I would like help with setting up time machine for backup.

    You will need an external hard drive (formatted for a Mac).
    Then you plug it in and go to system preferences>time machine and select the external HD and turn it on.
    The backups are automatic.
    Barry

  • Help with UCCX 8.5 scripting and xmls

    I have a customer with multiple scripts, we are moving them from 3.5 to 8.5 which is running on VMWare.  Here's my scenario:
    The caller can call the trigger 54779, enter a #, then a password of 12345.  Then they can set a normal condition by dialing 1, an after-hours condition by dialing 2, or an emergency condition by dialing 3.  I’m testing the “2” condition now. In the previous 3.5 system, if they dialed 2, the system copied the Doc “2.xml” and copied it to the Doc "Carolina_Access_Emergency_Check.xml", both of which are in the en_US folder in the Documents section.
    I can’t get this thing to change my document "Carolina_Access_Emergency_Check.xml". All I know is that it goes, “unsuccessful”. I’m pretty sure the authentication is working since it gets by that step.  If we can’t get the “copy” to work, really all I need to do with this option 2, is for the data in "Carolina_Access_Emergency_Check.xml" in <TYPE>1</TYPE> to change from a 1 to a 2." I'm attaching a zip with the old and new scripts along with the 2 xml files i'm referring to.  I need help on this one, please!

    Has the user you setup have Application Admin rights? I had this issue when I was trying to create an Emergency shutdown script and the user did not have sufficient rights.
    I don't mind sharing this script I created ,which effectively changes a value from 1 to a 2, which seems to be what you are trying to do but I can not figure out how to share it with you here. You could then use this as example to achieve what you are trying to do.

  • Help with a date field script

    Sorry if this is a repeat. I was interrupted and found that my browser had crashed when I came back so I'm not sure if the question got asked.
    I need a script for a date field (mm/dd/yyyy) where the user can only fill in a date that is between 12/31/1899 and the current date (whatever the date when the form is opened). I'm getting better at writing these but I haven't been successful with this one. Any help would be greatly appreciated.
    Thanks!

    I have a feeling I already answered this question some time ago... Anyway, you can use this code as the field's custom validation script:
    var minDate = util.scand("mm/dd/yyyy", "12/31/1899");
    var maxDate = new Date();
    event.rc = true;
    if (event.value) {
        var d = util.scand("mm/dd/yyyy", event.value);
        if (d<minDate || d>maxDate) {
            app.alert("Error! The entered date must be between " + util.printd("mm/dd/yyyy", minDate) + " and " + util.printd("mm/dd/yyyy", maxDate));
            event.rc = false;

  • Eem applet or script for sending email for syslog denies

    I am wanting to have my isr's send an email when a certain number of deny's occur on an ace.  So if i have a particular ace set up to log when tcp 3389 denied.  Then the eem applet or script would track when that deny entry happens.  When the deny hits on that entry reach three times, it will send an email alert.  The thing i am wondering about is how to set a variable within an event syslog pattern statement.  For instance, how do i say express a variable for the source ip/port in the below
    config-applet)# event syslog pattern "SEC-6-IPACCESSLOGP: list 198 denied tcp 201.198.71.51(38531) -> 212.184.81.52(3389)" occurs 3
    The source ip and port could rotate or change so i'd need to express that with some kind of variable.  How could that be done?(or is there a better approach altogether). 

    I put the below script in and it takes fine but does not send email alert.  Is there something more to do for configuring email sending? 
    event manager applet Intrusion-Tracking
    event syslog pattern "SEC-6-IPACCESSLOGP:.*-> 208.195.174.115\(3389\)" occurs 3
    action 1.0 mail server "173.16.7.2" to ".[email protected]" from ".eem@company1." subject ".intrusion_alert_from_c2900isr." body "Intrustion alert c2800isr"

  • Help with my first PKGBUILD script [solved]

    Hi There
    I am trying to write my first PKGBUILD script and I am landing in a bit of trouble.  The script is short and is:
    #Contributor: iKevin <kellwood-at-ameritech.net>
    pkgname=fpm
    pkgver=0.60
    pkgrel=1
    pkgdesc="A password manager for gnome"
    url="http://fpm.sourceforge.net"
    license="GPL"
    depends=('xorg' 'gtk' 'glibc' 'libgnome' 'libxml2' 'glib')
    source=(http://heanet.dl.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz)
    md5sums=(be7655d300c306c8f962f6aad0a60cc5)
    build() {
    cd $startdir/src/$pkgname-$pkgver
    ./configure --prefix=/usr
    make || return 1
    mkdir -p $startdir/pkg/usr/bin
    make prefix=$startdir/pkg/usr install
    I haven't reach the point where it compiles.  It failes to download the file.  Oddly, when I type:
    wget http://heanet.dl.sourceforge.net/source … .60.tar.gz
    it downloads fine.  When running makepkg, the contents of ./src/fpm-0.60.tar.gz is some kind of web page.
    I have eyeballed this PKGBUILD script for a while and I can't see any problems.  Is there something special about sourceforge files?  I feel that I must have a typo because makepkg is using wget, which works by hand.
    Thanks
    Kev

    Well,
    I installed kedpm with my first working PKGBUILD script.  I was able to import my "fpm" password file.  Once I get my gnucash stuff transfered into grisbi, I will be able to switch my main machine completely to archlinux.
    I know it is trivial for you guys, but here is my script -- it might save you some typing.
    Kev
    pkgname=kedpm
    pkgver=0.4.0
    pkgrel=1
    pkgdesc="Ked Password Manager helps to manage large amounts of passwords and related information"
    url="http://kedpm.sourceforge.net/"
    depends=(python pygtk pycrypto)
    makedepends=()
    conflicts=()
    replaces=()
    backup=()
    install=
    source=(http://dl.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz)
    md5sums=('6b83a646873f8ea00af9c6403aa259bc')
    build() {
    cd $startdir
    mkdir -p pkg/usr
    cd $startdir/src/$pkgname-$pkgver
    python setup.py install --prefix=$startdir/pkg/usr

  • Help with phpMyAdmin setup.php script

    Hi all,
    I am a newbie to Arch Linux even though I've been running Linux (-only) for more than a year. I have been mostly running Debian based distributions, so sometimes I feel a bit lost on Arch. So far I have been able to set everything up, from wireless to X server (by just reading the instructions, and some posts in the forum).
    Now I am stuck with something that is not so distro-related, I was following this guide (http://wiki.archlinux.org/index.php/LAMP) but I got stuck at the configuration script for phpMyAdmin.
    In fact, when I go to the address http://localhost/phpMyAdmin/scripts/setup.php I can only see the PHP code, not the web page.
    Now I am sure that Apache is running properly since my php test page runs just fine. So I cannot figure out why the setup.php page does not show correctly.
    Could somebody please give me some hints?
    Any help is greatly appreciated,
    Thanks for your time.

    np .. i forgot one point though , you needed to restart the web server so the php module takes the new settings. this is the case fro all config changes to either teh websierver or a modules/addon

  • [SOLVED] Need a little help with ACPI handler.sh script.

    By using ACPI I'm trying to get my laptop to hibernate at critical power state. So far I've made a few test scripts to test how to do this, with one of these scripts I'm stuck. My scripting skills are not that good to solve it.
    This is the script:
    if [ `awk '{print $3}' /proc/acpi/battery/C1E9/state` == "ok" ]
    then
    logger "battery is ok"
    else
    logger "battery is not ok"
    fi
    If I run the script I get an error (while "battery is not ok" is logged):
    ┌─[~]
    └─> ./test2
    ./test2: line 1: [: too many arguments
    ┌─[~]
    └─>
    When I run the awk-command from the script, I get the following output:
    ┌─[~]
    └─> awk '{print $3}' /proc/acpi/battery/C1E9/state
    ok
    discharging
    2341
    1824
    10969
    ┌─[~]
    └─>
    I think the problem lies in the multiple output of the awk-command, but I'm stuck in solving it.
    Any help would be great.
    Last edited by NeoXP (2009-11-16 22:40:45)

    @ skanky
    Thanks for the suggestion, but you're right I'm not gonna change a working script. It is working exactly as expected.
    @ all
    When interested this is my current handler.sh
    #!/bin/sh
    # Default acpi script that takes an entry for all actions
    # NOTE: This is a 2.6-centric script. If you use 2.4.x, you'll have to
    # modify it to not use /sys
    minspeed=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq`
    maxspeed=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq`
    setspeed="/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed"
    set $*
    case "$1" in
    button/power)
    echo "PowerButton pressed!">/dev/tty5
    case "$2" in
    PWRF) logger "PowerButton pressed: $2" ;;
    *) logger "ACPI action undefined: $2" ;;
    esac
    button/sleep)
    case "$2" in
    SLPB) echo -n mem >/sys/power/state ;;
    *) logger "ACPI action undefined: $2" ;;
    esac
    ac_adapter)
    case "$2" in
    AC)
    case "$4" in
    00000000)
    echo -n $minspeed >$setspeed
    #/etc/laptop-mode/laptop-mode start
    00000001)
    echo -n $maxspeed >$setspeed
    #/etc/laptop-mode/laptop-mode stop
    esac
    *) logger "ACPI action undefined: $2" ;;
    esac
    battery)
    if [ `awk '{print $2}' /proc/acpi/ac_adapter/C1E8/state` == "off-line" ];
    then
    logger "battery discharging"
    if (( `awk '{if (NR==5) {print $3}}' /proc/acpi/battery/C1E9/state` >= "250" ))
    then
    logger "battery ok"
    else
    logger "battery not ok"
    /usr/sbin/pm-hibernate;
    fi
    else logger "battery charging"
    fi
    button/lid)
    if [ `awk '{print $2}' /proc/acpi/button/lid/C1ED/state` == "closed" ];
    then
    logger "ACPI lid closed"
    /usr/sbin/pm-suspend
    fi
    logger "ACPI group/action undefined: $1 / $2"
    esac
    Still working on it though

  • HELP!! Need a script for DUMMIES for a simple login/register feature

    I know very little html and am more of a designer, but my programmer has let me me down so I have to take this on myself.
    I want to include a very common feature where visitors register to my site, so I can collect some information and contact details from them, then they can access hidden pages of the site and receive some exclusive download links by email, allowing them to download content (only once). They can then login each time they visit with a userID or email and a password.
    My host supports almost every scripting language.
    I've been told PHP is what I need, but I know absolutley nothing about it. My host said there is templates for such a simple script out there on the net for free but I'm being passed from pillar to post with scripts for much more complicated and rarer scripts than I need.
    Hope you can help.
    LB

    Do I need to create a database to store users info first?
    Yes. Without a database, it won't work.
    Is this a basic html page with a table with lots and lots or rows and columns for each of the details they have entered (e.g Name, DOB, Address.....etc)??
    No, I'm afraid not. Dreamweaver's PHP server behaviors work in conjunction with the MySQL database. If your hosting company supports PHP, you will almost certainly have access to a MySQL database and phpMyAdmin, a web-based program that helps create and maintain MySQL databases. As a minimum, your users table in the database will need three columns:
    user_id (a number that acts as the primary key for each record)
    username
    password
    You can also have other columns to store other details, such as first name, family name, and any other information that you want to store.
    If you have never done any PHP or database development before, this is going to be a major undertaking for you. The Adobe Developer Centre has some articles that show you how to set up a PHP/MySQL testing environment (http://www.adobe.com/devnet/dreamweaver/articles/setting_up_php.html) and create your first database-driven pages (http://www.adobe.com/devnet/dreamweaver/articles/php_event_registration.html). The Dreamweaver help files also step you through the process of creating a login system (http://help.adobe.com/en_US/Dreamweaver/10.0_Using/WScbb6b82af5544594822510a94ae8d65-7883a .html).
    Working with PHP/MySQL isn't difficult, but there's a lot to absorb. If you're going to start working with login systems and other database-driven features, you might find it useful to take a look at one of my books about Dreamweaver and PHP. I have different editions for Dreamweaver 8, CS3, and CS4. You can find more details at my website (http://foundationphp.com/).
    Good luck.

  • Help me making a deamon script for a specific eth0 configuration

    hi
    my idea is to have a daemon script for configuring my eth0 device with specific settings to connect to my xbox.
    i"ve got no idea on how to wirite a daemon script, so i hope to get some help from the community
    eth0 sould have:
    192.168.1.33  as ip
    255.255.255.0 as netmask
    192.168.1.1.55  as gateway

    kriz wrote:
    i k'no its possible with network deamon, but its a great investement to uncomment everytime my rc.conf, then /etc/rc.d/network start...
    i"m using by default my wireless to connect to internet
    don't want to use netcfg. want something like wpa_auto does for wireless conectons, just for eth0 specific settings
    You need to uncomment it once and set the correct values. That's it.

  • Help with centrally locating a script so it updates all fields?

    Hello,
    At work we use a form I built that shows were each employee in assigned for the day.  We have some part-time personal and I've made it so that they show up in red where all normal employee's show up as black.  This works great, my issue is when a new employee is hired or a part-time goes full time I am having to go into each individual field and change this script.   There is 60 fields total so as you would imagine this takes a lot of time to update just one employee.   Below is a sample of the script I am using to designate if the name should be black (full-time) or red (part-time). 
    Is there a way that I can point all fields to one location?  Then I would only have to update one field and it fix them all??
    if (event.value=="BRACKETT" ||  event.value=="Deleted" ||
    event.value=="P. BOWMAN" ||
    event.value=="TALLENT" ||
    event.value=="EDWARDS" ||
    event.value=="MEJIA" ||event.value=="ROGERS" ||event.value=="LASKEY" ||
    event.value=="HOUSER" ||
    event.value=="BROOKS" ||
    event.value=="GORDON") event.target.textColor = color.red;
    else event.target.textColor = color.black;
    Thank-you so much,
    David

    OK, remove all of the code from the document JavaScript and replace it with the code shown below. When you need to update the names in the dropdowns, set up a button and use the following as its Mouse Up script:
    // Mouse Up script for a button
    updateDropdowns();
    You can hide the button and unhide it whenever you need to update, and then hide it again. You can also run that line of code from the interactive JavaScript console, but a button is a bit easier.
    This way, you just have to add names and what color you want for each by editing the oEmpNames object code. When you're done editing the list of names, run the updateDropdowns routine and all of the dropdowns will be updated with the new list.
    // All if the code below goes in a document JavaScript
    // Create an object to associate an employee name with text color to user when selected in a dropdown
    var oEmpNames = {
      "George Washington" : color.black,
      "Thomas Jefferson" : color.red,
      "Abraham Lincoln" : color.black,
      "Teddy Roosevelt" : color.black,
      "John Kennedy" : color.red,
      "Ronald Reagan" : color.black
    // Validate script for dropdowns
    function  validateEmpName() {
      event.target.textColor = oEmpNames[event.value];
    // Function to update dropdowns with list of employee names
    function updateDropdowns() {
      // Create an array of names to populate the dropdown items
      var aItems = [];
      for (var name in oEmpNames) {
      aItems.push(name);
      // Loop through the dropdowns and populate them with names in the array
      for (var i = 0; i < aDropdowns.length; i += 1) {
      getField(aDropdowns[i]).setItems(aItems);
    // Create an array of dropdown names
    var aDropdowns = [
    "Dropdown1",
    "Dropdown4922",
    "Dropdown4923",
    "Dropdown4924",
    "Dropdown490",
    "Dropdown482",
    "Dropdown470",
    "Dropdown4600",
    "Dropdown491",
    "Dropdown480",
    "Dropdown471",
    "Dropdown461",
    "Dropdown492",
    "Dropdown481",
    "Dropdown472",
    "Dropdown4620",
    "Dropdown493",
    "Dropdown483",
    "Dropdown473",
    "Dropdown463",
    "Dropdown494",
    "Dropdown48",
    "Dropdown47",
    "Dropdown460",
    "Dropdown47011",
    "Dropdown46011",
    "Dropdown47211",
    "Dropdown4621",
    "Dropdown47311",
    "Dropdown46311",
    "Dropdown2",
    "Dropdown4",
    "Dropdown5",
    "Dropdown11",
    "Dropdown4925",
    "Dropdown4926",
    "Dropdown4927",
    "Dropdown4901",
    "Dropdown4821",
    "Dropdown4701",
    "Dropdown4601",
    "Dropdown4911",
    "Dropdown4801",
    "Dropdown4711",
    "Dropdown4611",
    "Dropdown4921",
    "Dropdown4811",
    "Dropdown4721",
    "Dropdown462",
    "Dropdown4931",
    "Dropdown4831",
    "Dropdown4731",
    "Dropdown4631",
    "Dropdown4941",
    "Dropdown4813",
    "Dropdown4712",
    "Dropdown46",
    "Dropdown47019",
    "Dropdown460116",
    "Dropdown472129",
    "Dropdown462186",
    "Dropdown473115",
    "Dropdown463158"

  • Help with multiple user login script

    Hi, just a little background first to what i want to do...
    I have about 300 Macs in an education environment, they are bound to the AD network for authentication and OSX Server LDAP for forced prefs, the network Home accounts are stored via Apple and Promise Raids on XServes.
    We also have 4 local user accounts on all the Macs for video etc. I have some simple scripts that i would like to force to the local Users only, (empty trash, reset dock. reset desktop pics and delete items etc).
    I have done the script and saved it as a .app and it works on the Macs as a local User login option. However, when I bind the Mac back to the LDAP the local user script stops working. I have seen the option to 'Allow local scripts' to run via WGM, but have not had success here either, (I have ran the 2 EnableMCXLoginScripts on the clients).
    Now I thought I would try to run the script as a Launchdaemon option using Lingon. This works, but its active for all users, I do not want it to delete Network account users Desktops! Is there a way I can add an 'If' option at the beginning of my script. As in..'if users home account is /Network/Sharepoint' then quit.
    I cannot run it as a one script for all Mac setting as the different local users have different Desktop Pics and Docks etc
    Any ideas or other options I could try?
    Any help hugely appreciated.
    C

    V.K, thanks for that, sometimes I just don't see the obvious.
    I have tried it as a ~/Library/LaunchAgents using lingon to create the .plist. I just cannot get it to run though. I have tried it as a .sh .scpt and as a .app file stored in the /Users/Shared folder.
    All will run if I manually launch them after login though. I have made them all executable for all.
    I have also tried to run it without the Mac connected to my LDAP. I have added the relevant folders to the allow list in WGM on the lDAP anyway...
    Any ideas what I could be doing wrong?
    C

  • Help with a contact form script

    I have this contact form but it doesn't send the email
    this is the page www.vonhaucke.mx
    and the script for contacto.php is:
    <!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>.:vonhaucke:.</title>
    <link href="contacto.css" rel="stylesheet" type="text/css" media="screen" />
    </head>
    <body>
    <table align="center" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="372"> </td>
        <td width="278" class="margen"><div id="logo" class="logo"><img src="img/logovonhaucke.png" width="228" height="71" alt="Vonhaucke" title="Vonhaucke"></div></td>
      </tr>
      <tr>
        <td style="border-bottom:#CCC solid 1px; border-top:#CCC solid 1px;"><h1>Contacto</h1></td>
        <td style="border-bottom:#CCC solid 1px; border-left:#CCC solid 1px; border-top:#CCC solid 1px;"> </td>
      </tr>
      <tr>
        <td valign="top" align="right">
      <div id="contact" align="right">   
      <form action="enviar.php" method="post">
      <label for="name">Nombre:</label>
      <input type="text" name="nombre" /><br />
      <label for="name">Apellido:</label>
      <input type="text" name="apellido" /><br />
      <label for="name">Empresa:</label>
      <input type="text" name="empresa" /><br />              
      <label for="email">Email:</label>
      <input type="email" name="mail" /><br />
      <label for="name">Página web:</label>
      <input type="text" name="web" /><br />
      <label for="name">Teléfono:</label>
      <input type="text" name="telefono" /><br />                       
      <label for="message">Comentarios:</label>
      <textarea name="comentarios"></textarea><br />
      <input type="submit" value="Enviar" />
      </form>
        </div>
        </td>
        <td class="margen">
            <div id="direccion">
                <strong>Sala de Exhibición y Oficinas</strong><br />Paseo de la Reforma 284 PH<br />
                Col. Juárez Del Cuauhtémoc<br />06600 México DF<br />T :: 5999 9200<br />
               www.vonhaucke.mx<br />       
                <strong>Aguascalientes</strong><br />T :: 014499145150.<br />E-mail :: [email protected]<br />
                <strong>Bajio</strong><br />T :: 014422150577.<br />E-mail :: [email protected]<br />
                <strong>Cancún</strong><br />T :: 019988920272.<br />E-mail :: [email protected]<br />
                <strong>Hidalgo</strong><br />T :: 0445539243356.<br />E-mail :: [email protected]<br />
                <strong>Puebla</strong><br />T :: 012224661905.<br />E-mail :: [email protected]<br />
                <strong>Toluca</strong><br />T :: 017222714990.<br />E-mail :: [email protected]<br />
                <strong>Nueva York</strong><br />(800) 7113572<br />Sherry Mitchel Inc. Vonhaucke<br />P.O. Box 3035<br />Sea Bright, N,J. 07760
            </div> <br />
        </td>
      </tr>
      <tr>
        <td colspan="2" align="center">
        <div id="ubicacion">Paseo de la Reforma 284 PH, Col. Juárez, Del. Cuauhtémoc, C.P. 06600, México D.F. T.(55) 5999 9200, e-mail. [email protected]</div>
        </td>
      </tr>
    </table>
    </body>
    </html>
    the script for enviar.php is
    <?php
    $nombre = $_POST['nombre'];
    $apellido=$_POST['apellido'];
    $empresa = $_POST['empresa'];
    $mail = $_POST['mail'];
    $web = $_POST['web'];
    $telefono = $_POST['telefono'];
    $comentarios = $_POST['comentarios'];
    $header = 'From: ' . $mail . " \r\n";
    $header .= "X-Mailer: PHP/" . phpversion() . " \r\n";
    $header .= "Mime-Version: 1.0 \r\n";
    $header .= "Content-Type: text/plain";
    $mensaje = "Este mensaje fue enviado por " . $nombre ." ". $apellido. ", de la empresa " . $empresa . ", Sitio web: " . $web . " \r\n";
    $mensaje .= "Su e-mail es: " . $mail . " \r\n";
    $mensaje .= "Mensaje: " . $_POST['comentarios'] . " \r\n";
    $mensaje .= "Enviado el " . date('d/m/Y', time());
    $para = '[email protected]';
    $asunto = 'Comentarios desde sitio web: vonhaucke';
    mail($para, $asunto, utf8_decode($mensaje), $header);
    //echo 'Mensaje enviado correctamente';
    ?>
    <!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>.:vonhaucke:.</title>
    <link href="contacto.css" rel="stylesheet" type="text/css" media="screen" />
    </head>
    <body>
    <table align="center" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="372"> </td>
        <td width="278" class="margen"><div id="logo" class="logo"><img src="img/logovonhaucke.png" width="228" height="71" alt="Vonhaucke" title="Vonhaucke"></div></td>
      </tr>
      <tr>
        <td style="border-bottom:#CCC solid 1px; border-top:#CCC solid 1px;"><h1>Contacto</h1></td>
        <td style="border-bottom:#CCC solid 1px; border-left:#CCC solid 1px; border-top:#CCC solid 1px;"> </td>
      </tr>
      <tr>
        <td valign="top" align="right">
      <div id="contact" align="right">   
      <form action="#" method="post">
      <p align="center">Mensaje enviado correctamente</p>
            <input type="button" onClick="parent.$.modal().close()" value="Cerrar">
      </form>
        </div>
        </td>
        <td class="margen">
            <div id="direccion">
                <strong>Aguascalientes</strong><br />T :: 014499145150.<br />E-mail :: [email protected]<br />
                <strong>Bajio</strong><br />T :: 014422150577.<br />E-mail :: [email protected]<br />
                <strong>Cancún</strong><br />T :: 019988920272.<br />E-mail :: [email protected]<br />
                <strong>Hidalgo</strong><br />T :: 0445539243356.<br />E-mail :: [email protected]<br />
                <strong>Puebla</strong><br />T :: 012224661905.<br />E-mail :: [email protected]<br />
                <strong>Toluca</strong><br />T :: 017222714990.<br />E-mail :: [email protected]<br />
                <strong>Nueva York</strong><br />(800) 7113572<br />Sherry Mitchel Inc. Vonhaucke<br />P.O. Box 3035<br />Sea Bright, N,J. 07760
            </div> <br />
        </td>
      </tr>
      <tr>
        <td colspan="2" align="center">
        <div id="ubicacion">Paseo de la Reforma 284 PH, Col. Juárez, Del. Cuauhtémoc, C.P. 06600, México D.F. T.(55) 5999 9200, e-mail. [email protected]</div>
        </td>
      </tr>
    </table>
    </body>
    </html>
    I don't know why is not sending the email to [email protected]

    Your script works ok when I test it out - the information is sent to the specified email address - although I don't know what the below code has to do with it all? (I've blanked the email addresses to avoid spam)
    <!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>.:vonhaucke:.</title>
    <link href="contacto.css" rel="stylesheet" type="text/css" media="screen" />
    </head>
    <body>
    <table align="center" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="372"> </td>
        <td width="278" class="margen"><div id="logo" class="logo"><img src="img/logovonhaucke.png" width="228" height="71" alt="Vonhaucke" title="Vonhaucke"></div></td>
      </tr>
      <tr>
        <td style="border-bottom:#CCC solid 1px; border-top:#CCC solid 1px;"><h1>Contacto</h1></td>
        <td style="border-bottom:#CCC solid 1px; border-left:#CCC solid 1px; border-top:#CCC solid 1px;"> </td>
      </tr>
      <tr>
        <td valign="top" align="right">
      <div id="contact" align="right">   
      <form action="#" method="post">
      <p align="center">Mensaje enviado correctamente</p>
            <input type="button" onClick="parent.$.modal().close()" value="Cerrar">
      </form>
        </div>
        </td>
        <td class="margen">
            <div id="direccion">
                <strong>Aguascalientes</strong><br />T :: 014499145150.<br />E-mail :: xxxxxxxxx@xxxxxxxx<br />
                <strong>Bajio</strong><br />T :: 014422150577.<br />E-mail :: xxxxxxxxx@xxxxxxxx<br />
                <strong>Cancún</strong><br />T :: 019988920272.<br />E-mail :: xxxxxxxxx@xxxxxxxx<br />
                <strong>Hidalgo</strong><br />T :: 0445539243356.<br />E-mail :: xxxxxxxxx@xxxxxxxx<br />
                <strong>Puebla</strong><br />T :: 012224661905.<br />E-mail :: xxxxxxxxx@xxxxxxxx<br />
                <strong>Toluca</strong><br />T :: 017222714990.<br />E-mail :: xxxxxxxxx@xxxxxxxx<br />
                <strong>Nueva York</strong><br />(800) 7113572<br />Sherry Mitchel Inc. Vonhaucke<br />P.O. Box 3035<br />Sea Bright, N,J. 07760
            </div> <br />
        </td>
      </tr>
      <tr>
        <td colspan="2" align="center">
        <div id="ubicacion">Paseo de la Reforma 284 PH, Col. Juárez, Del. Cuauhtémoc, C.P. 06600, México D.F. T.(55) 5999 9200, e-mail. xxxxx@xxxxxx</div>
        </td>
      </tr>
    </table>
    </body>
    </html>

Maybe you are looking for

  • Missing Table Header

    Hi, Can someone tell my why I can't see my table headers. I have placed the table inside the JScrollPane but it still doesn't work. package tablepractice; import javax.swing.*; import javax.swing.table.*; import java.awt.*; public class TableFrame   

  • Error at Insert new Line in the Table (ITERATOR)

                public String novaLinhaTabela() {              BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();              //access the name of the iterator the table is bound to. Its "allDepartmentsIterator"          

  • Some of the items in the itunes library were not copied to the ipad because they could not be found

    Hi All, problem with my ipad mini. When trying to copy music over I get the following "some of the items in the itunes library were not copied to the ipad because they could not be found". I reset the ipad, as new, not a backup copy, and managed to r

  • InDesign and Excel

    Background: I have a localised InDesign file with a bunch of English "terms" identified by character styles. I need to find each term in the document and look it up in an Excel spreadsheet. When I find a match in the spreadsheet, the ajoining cell wi

  • EHP4 - 6.14.1.7 Retail-specific POWER list: promotion

    I'm trying to gather detailed info abt this specific power-list (6.14.1.7 Retail-specific POWER list: promotion)  I don't see Detailed info for P4 anywhere posted? plz point to any doc repository. thanks. Suresh.