Help with this contact form.

Hi there
I need help modifying a servlet to send email using a smtp home base internet connection,,(Sympatico)
with a username and password... and server name (smtp)
I am also using mysql with email parameters
This is my servlet
package ca.ccf.messaging;
import java.util.Properties;
import java.util.Date;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Service;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
import ca.ccf.db.DBConfig;
public class MessagingUtils {
     public enum Email {EASTHAWKS_CONTACT}
     public static final String SMTP_SERVER = "localhost";
     private static final String SQL_EMAIL = "SELECT " +
          DBConfig.CONTACT_EMAIL + " FROM " + DBConfig.CONTACT_EMAIL_TABLE +
          " WHERE " +     DBConfig.CONTACT_SECTION_ID + "=?";
     private static final String ERROR_MSG_EMAIL =
          "The recipient email address needs to be set";
     public static void sendMessage(Connection conn, Email from, Email to,
               String subject, String text)
     throws SQLException, MessagingException {
          String emailTo = getEmail(conn, to);
          if (emailTo == null)
               throw new MessagingException(ERROR_MSG_EMAIL);
          sendMessage(conn, from, emailTo, subject, text);
     public static void sendMessage(Connection conn, Email from, String to,
               String subject, String text)
     throws SQLException, MessagingException {
          String emailFrom = getEmail(conn, from);
          if (emailFrom == null)
               throw new MessagingException(ERROR_MSG_EMAIL);
          Properties props = new Properties();
          props.put("mail.smtp.host", SMTP_SERVER);
          Session session = Session.getDefaultInstance(props);
          Message message = new MimeMessage(session);
          InternetAddress addrTo = new InternetAddress(to, true);
          InternetAddress addrFrom = new InternetAddress(emailFrom, true);
          message.setFrom(addrFrom);
          message.addRecipient(Message.RecipientType.TO, addrTo);
          message.setSubject(subject);
          message.setText(text);
          message.setSentDate(new Date());
          try {
               Transport.send(message);
          catch (Exception e) {
               // TODO: handle exception
     private static String getEmail(Connection conn, Email email)
     throws SQLException {
          String addr = null;
          PreparedStatement pstmt = conn.prepareStatement(SQL_EMAIL);
          switch (email) {
          case EASTHAWKS_CONTACT:
               pstmt.setInt(1, DBConfig.EASTHAWKS_CONTACT);
               break;
          ResultSet rs = pstmt.executeQuery();
          if (rs.next())
               addr = rs.getString(1);
          rs.close();
          pstmt.close();
          return addr;
}

I need help modifying a servlet to send email using a smtp home base internet connection,,(Sympatico)
with a username and password... and server name (smtp)obtain the name of the 'Sympatico' smtp server and use it as your SMTP_SERVER, you can't use localhost because I guess you don't have a smtp server at home....
This is my servletNo, thats not a servlet.
I can't comment on the code because you have not enclosed your code in code tags, like this {code}your code hereThanks!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • 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>

  • Need help with PHP contact form

    Hi guys,
    I've made a PHP contact form for my site and need help with a couple of things:
    The form action links an external PHP script (scripts/contact-form-script.php) but is there a way I can have it so the PHP script for the form is contained within the same PHP file as my contact form (contact.php)?
    I tried just putting the form code at the top of contact.php but the browser automatically reads the anti-spam re-direct, so maybe that needs revising too?
    The second thing is, how can I make the Name, Email and Message fields mandatory? So if a user tries to submit the form and hasn't filled in one of the required fields and clicks submit, contact.php reloads with a message at the top of the form saying something like 'Complete the required fields' and highlights the relevant field with a red border?
    Here's the code for contact.php:
    <form action="http://www.mydomain.com/scripts/contact-form-script.php" method="post" name="contact" id="contact">
    <p><strong>Name:*</strong><br />
    <input name="name" type="text" class="ctextField" /></p>
    <p><strong>E-mail:*</strong><br />
    <input name="email" type="text" class="ctextField" /></p>
    <p><strong>Telephone:</strong><br />
    <input name="telephone" type="text" class="ctextField" /></p>
    <p><strong>Company:</strong><br />
    <input name="company" type="text" class="ctextField" /></p>
    <p><strong>Address:</strong><br />
    <input name="address1" type="text" class="ctextField" /></p>
    <p><input name="address2" type="text" class="ctextField" /></p>
    <p><strong>Town:</strong><br />
    <input name="town" type="text" class="ctextField" /></p>
    <p><strong>County:</strong><br />
    <input name="county" type="text" class="ctextField" /></p>
    p><strong>Postcode:</strong><br />
    <input name="postcode" type="text" class="ctextField" /></p>
    <p><strong>Message:*</strong><br />
    <textarea name="message" cols="55" rows="8" class="ctextField"></textarea></p>
    <p><input name="submit" value="SEND MESSAGE" class="submitButton" type="submit" /><div style="visibility:hidden; width:1px; height:1px"><input name="url" type="text" size="45" id="url" /></div></p>
    </form>
    And this is the PHP I'm using to submit the form data for contact-form-script.php:
    <?php
    $headers .= "Reply-To: " . $_POST["email"] . "\r\n";
    $to = "[email protected]";
    $subject = "Contact from website";
    $message = $headers;
    $message .= "Name: " . $_POST["name"] . "\r\n";
    $message .= "E-mail: " . $_POST["email"] . "\r\n";
            $message= '
                <table cellspacing="0" cellpadding="8" border="0" width="500">
                <tr>
                    <td colspan="2"></td>
                </tr>
                <tr bgcolor="#eeeeee">
                  <td width="154" style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Name</strong></td>
                  <td width="314" style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$name.'</td>
                </tr>
                <tr bgcolor="#eeeeee">
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>E-mail address:</strong></td>
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$email.'</td>
                </tr>
                <tr bgcolor="#eeeeee">
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Telephone number:</strong></td>
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$telephone.'</td>
                </tr>
                <tr bgcolor="#eeeeee">
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Company:</strong></td>
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$company.'</td>
                </tr>
                <tr bgcolor="#eeeeee">
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Address</strong></td>
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$address1.'</td>
                </tr>
                <tr bgcolor="#eeeeee">
                  <td></td>
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$address2.'</td>
                </tr>
                <tr bgcolor="#eeeeee">
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Town</strong></td>
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$town.'</td>
                </tr>
                <tr bgcolor="#eeeeee">
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>County</strong></td>
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$county.'</td>
                </tr>
                <tr bgcolor="#eeeeee">
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Postcode</strong></td>
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$postcode.'</td>
                </tr>
                <tr bgcolor="#eeeeee">
                    <td colspan="2" style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Message</strong></td>
                </tr>              
                <tr bgcolor="#eeeeee">
                    <td colspan="2" style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$message.'</td>
                </tr>              
                <tr><td colspan="2" style="padding:0px;"><img src="images/whitespace.gif" alt="" width="100%" height="1" /></td></tr>
             </table>
    $url = stripslashes($_POST["url"]);
    if (!empty($url)) {
    header( 'Location: http://www.go-away-spam-robots.com' );
    exit();
    mail($to, $subject, $message, $headers);
    header( 'Location: http://www.mydomain.com/sent.php' ) ;
    ?>
    Any help on this would be greatly appreciated.
    Thank you and I hope to hear from you!
    SM

    Revised code with form validation for Name Email and Message:
    <?php
    if (array_key_exists('submit', $_POST)) {
        $name = $_POST['name'];
        $email = $_POST['email'];
        $telephone = $_POST['telephone'];
        $company = $_POST['company'];
        $address1 = $_POST['address1'];
        $address2 = $_POST['address2'];
        $town = $_POST['town'];
        $county = $_POST['county'];
        $postcode = $_POST['postcode'];
        $formMessage = $_POST['message'];
    if (empty($name)) {
                                                $warning['name'] = "Please provide your name";
    if (empty($email)) {
                                                $warning['email'] = "Please provide your email";
    if (empty($formMessage)) {
                                                $warning['message'] = "Please provide your message";
    $headers .= "Reply-To: " . $_POST["email"] . "\r\n";
    $to = "[email protected]";
    $subject = "Contact from website";
    $message = $headers;
    $message .= "Name: " . $_POST["name"] . "\r\n";
    $message .= "E-mail: " . $_POST["email"] . "\r\n";
    $headers  = "MIME-Version: 1.0\r\n";
    $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
            $message= "
    <table cellspacing='0' cellpadding='8' border='0' width='500'>
                <tr>
                    <td colspan='2'></td>
                </tr>
                <tr bgcolor='#eeeeee'>
                  <td width='154' style='font-family:Verdana, Arial; font-size:11px; color:#333333;'><strong>Name</strong></td>
                  <td width='314' style='font-family:Verdana, Arial; font-size:11px; color:#333333;'>".$name."</td>
                </tr>
                <tr bgcolor='#eeeeee'>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'><strong>E-mail address:</strong></td>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'>".$email."</td>
                </tr>
                <tr bgcolor='#eeeeee'>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'><strong>Telephone number:</strong></td>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'>".$telephone."</td>
                </tr>
                <tr bgcolor='#eeeeee'>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'><strong>Company:</strong></td>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'>".$company."</td>
                </tr>
                <tr bgcolor='#eeeeee'>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'><strong>Address</strong></td>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'>".$address1."</td>
                </tr>
                <tr bgcolor='#eeeeee'>
                  <td></td>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'>".$address2."</td>
                </tr>
                <tr bgcolor='#eeeeee'>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'><strong>Town</strong></td>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'>".$town."</td>
                </tr>
                <tr bgcolor='#eeeeee'>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'><strong>County</strong></td>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'>".$county."</td>
                </tr>
                <tr bgcolor='#eeeeee'>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'><strong>Postcode</strong></td>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'>".$postcode."</td>
                </tr>
                <tr bgcolor='#eeeeee'>
                    <td colspan='2' style='font-family:Verdana, Arial; font-size:11px; color:#333333;'><strong>Message</strong></td>
                </tr>              
                <tr bgcolor='#eeeeee'>
                    <td colspan='2' style='font-family:Verdana, Arial; font-size:11px; color:#333333;'>".$formMessage."</td>
                </tr>              
                <tr><td colspan='2' style='padding: 0px;'><img src='images/whitespace.gif' alt='' width='100%' height='1' /></td></tr>
             </table>
    $url = stripslashes($_POST["url"]);
    if (!empty($url)) {
    header( 'Location: http://www.go-away-spam-robots.com' );
    exit();
    if (!isset($warning)) {
    mail($to, $subject, $message, $headers);
    header( 'Location: http://www.mydomain.com/sent.php' ) ;
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    p {
        margin: 0;
        padding: 10px 0 0 0;
    .warning {
        color:#C00;
    </style>
    </head>
    <body>
    <form action="" method="post" name="contact" id="contact">
    <p><strong>Name:*</strong><br />
    <input name="name" <?php if (isset($warning['name'])) { echo "style='border: 1px solid #C00'"; } ?> type="text" class="ctextField" />
    <?php if (isset($warning['name'])) { echo "<p class='warning'>".$warning['name']."</p>"; }?>
    </p>
    <p><strong>E-mail:*</strong><br />
    <input name="email" <?php if (isset($warning['email'])) { echo "style='border: 1px solid #C00'"; } ?>type="text" class="ctextField" />
    <?php if (isset($warning['name'])) { echo "<p class='warning'>".$warning['email']."</p>"; }?>
    </p>
    <p><strong>Telephone:</strong><br />
    <input name="telephone" type="text" class="ctextField" /></p>
    <p><strong>Company:</strong><br />
    <input name="company" type="text" class="ctextField" /></p>
    <p><strong>Address:</strong><br />
    <input name="address1" type="text" class="ctextField" /></p>
    <p><input name="address2" type="text" class="ctextField" /></p>
    <p><strong>Town:</strong><br />
    <input name="town" type="text" class="ctextField" /></p>
    <p><strong>County:</strong><br />
    <input name="county" type="text" class="ctextField" /></p>
    <p><strong>Postcode:</strong><br />
    <input name="postcode" type="text" class="ctextField" /></p>
    <p><strong>Message:*</strong><br />
    <?php if (isset($warning['message'])) { echo "<p class='warning'>".$warning['message']."</p>"; }?>
    <textarea name="message" <?php if (isset($warning['message'])) { echo "style='border: 1px solid #C00'"; } ?> cols="55" rows="8" class="ctextField"></textarea></p>
    <p><input name="submit" value="SEND MESSAGE" class="submitButton" type="submit" /><div style="visibility:hidden; width:1px; height:1px"><input name="url" type="text" size="45" id="url" /></div></p>
    </form>
    </body>
    </html>

  • Help with custom contact form

    hey... i have been trying to cr8 a custom contact me from:
    the code inside the flash movie declares the variable's and
    sends them
    on the othere hand i ahve also added the code inside the php
    script which is currently
    just trying to catch some of the varible's unsuccsesfully
    can anyone help me with this? i am not strong with php and
    thats my problem

    ef: http://www.aocroswell.com/aocroswellnew/site_flash/index-6-testcontact.html
    You have 6 opening <form> tags with several levels of wrongness about them.
    They are nested in a most confusing way.
    You have 4 closing </form> tags for those 6 opening tags.
    <form action="/aocroswellnew/contact.asp" id="form">
    <form>
    <form name="contact_form" action="contact.php" method="get">
    <form action="contact.php" method="get">
    <form id="form" method="post"  target=”_blank” action="contact.asp" name="form">
    <form id="form" method="post"  target=”_blank” action="contact.asp" name="form" >
    And I haven't even started on the controls you have (and don't have) inside some of those forms.
    You cannot have multiple instances of identical ids in a Web page.
    Try this.
    Decide ahead of time whether you want to use PHP or ASP for the action attribute.
    Decide ahead of time whether you want to use GET or POST for the method attribute.
    Create a new page in DW according to your chosen action attribute (and the path to an existing script to process this action).
    Create a new form in that page and fill in the action and method attributes as appropriate.
    Create your input controls and your button controls, giving them names, ids, and possibly labels. The names & ids may need to match whatever your script is expecting to see (I don't read asp).
    Now look at this page in Code view to see how a form should look.
    http://www.w3.org/TR/html401/interact/forms.html#h-17.1
    Mark A. Boyd
    Keep-On-Learnin' :-)
    Message was edited by: Mark A. Boyd

  • Help with php contact form

    I built a form in Dreamweaver CS4 which looks and seems to work fine both in IE and FF. I then wrote the PHP script and uploaded it to my hosting site. When I fill in the form on the web, I get my "thank you" email stating I will contact them in 24 - 48 hours. I also get this from the hosting site - This email was sent using the PHP mail() function. If you received this email than the PHP mailer is working fine. With all that said my problem is that I do not get a copy of the form details. On the properties section in Dreamweaver, I have the Form ID as contactus and Action connecting to my folder - ../Contactform.php, but I have the target blank. What would it be - blank, parent or self or should it just be black?
    Thanks in advance for any help. 

    target="_blank" opens a page in a new window. It is not used for forms processing.
    For a form, when you begin it, you need to tell it what's going to happen:
    <form method="post" action="Contactform.php">
    (And, actually, I don't recommend the use of upper and lower-case characters in any file that is to be called by a web server, bu that is not related to your issue.)
    Then, you will have an action button at the bottom of your form:
    <input type="submit" value=" Contact Me" />
    When that action button (or submit button) is activated on your web page, it should query the form for what to do. In the case that I'm outlining here, the action is to run the php file you have called Contactform.php.
    At that point, your php code takes over and will do something.
    In your php, do you have something like this?
    $subject = Contact_from_your_webpage;
    $notes = stripcslashes($notes);
    $message = " $todayis [EST] \n
    Message: $notes \n
    From: $visitor ($visitormail)\n
    Telephone: $visitorphone ($visitorphone)\n
    From: $visitor ($visitormail)\n
    Address: $address1 ($address1)\n
    Address: $address2 ($address2)\n
    From: $city $state  $zip\n
    $from = "From: $visitormail\r\n";
    mail("[email protected]", $subject, $message, $from);
    This should send you an email with all of the stuff you put in your form to send
    Please understand that, in this case, I am using form fields that may be different from yours (you didn't provide us with a link, so I don't know what your form fields are). My fields are as follows:
    visitor
    visitormail
    visitorphone
    address1
    address2
    city
    state
    zip
    notes
    I am going to hazard a guess that, either you didn't tell your form to do the right thing or your php is wrong.
    -Mark

  • I downloaded the icloud software on my computer in order to sync calendars and contacts using Windows 2007, but I keep getting an error message when trying to sync my icloud and Outlook calenders - can anyone help with this?

    I downloaded the icloud software on my computer in order to sync calenders and contacts using Windows 2007, but I keep getting an error message when trying to sync my icloud and Outlook calendars.  I downloaded it for the first time a month ago and  had it working but it stopped syncing, so I deinstalled the iCloud software and reinstalled, but keep getting the error message "Your setup couldn't be started because of an unexpected error.  What do I do now?  Can anyone help with this?

    Hello easbda,
    Thank you for providing the details of the calendar issue you are experiencing with your iPhone.  I recommend following the steps in the section titled "Troubleshooting on Microsoft Windows (Microsoft Outlook)" in the following article to assist with syncing your calendar events between your devices:
    iCloud: Troubleshooting iCloud Calendar
    http://support.apple.com/kb/ts3999
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • Cannot open Contact Sheet II on my Elements 12, gives me error message. Can anyone help with this?

    In Elements 12, I cannot open Contact Sheet II. I keep getting an error message.  Can anyone help with this?

    That's a different file.
    Try this:
    1. Click on your desktop
    2. Then in the Go menu click on Go To Folder
    3. Paste the following line in the Go To Folder dialog and press Go
    ~/Library/Preferences/Adobe/Plugins/Adobe Contact Sheet II PSE12/Elements
    4. That should open a finder window something like below.
       Drag the Adobe Contact Sheet PSE12 Prefs to the Trash on the dock
    5. Start the pse 12 editor and see the contact sheet II works.

  • Hello, I would like to download my contacts from icloud to a flash drive in order to print out.  Can anyone help with this?  Many thanks

    Hello, I would like to download my contacts from icloud to a flash drive in order to have them printed out as I have over 4,000 contacts.  Could anyone help with this?  Thank you

    This  this discussion >  https://discussions.apple.com/message/24150181#24150181

  • Whenever I try to enter my credit card information into iTunes via either my mac book or my iphone it says there is an error and says "for assistance, please contact itunes support, etc...". Can anyone help with this?

    Whenever I try to enter my credit card information into iTunes via either my mac book or my iphone it says there is an error and says "for assistance, please contact itunes support, etc...". Can anyone help with this?
    I haven't had any luck at all getting it resolved using iTunes support so I'm hoping someone who's encountered the problem can help me.

    What did itunes suport tell you?
    They will need to solve this.

  • I'm Still having problems with my contact form, can someone look at it and help me?

    http://www.alpenawebdesigns.com
    when I try and submit my contact form I get a 404 error something about a port 80 (I'm using port 21) I use Godaddy as a host and this contact form works in another program
    http://www.bayviewdropincenter.org
    can someone look at these and tell me what is the problem?
    Also is there a user group in the Alpena Mi area?

    The requested URL /form-to-email.php was not found on this server.  Did you upload the script?
    Also, please take my URL out of your footer code.   Thanks. 
    <div id="footer">
    <p>&copy; 2012 <a href="http://alt-web.com/">Alpena Web Designs</a> all rights reserved.</p>
    </div>
    Finally, validate your code.  You're missing a closing </div> tag for your header.
    http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.alpenawebdesigns.com%2Fcontac tus.html
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com/

  • My Client is having a serious problem with the Contact Form Widget

    My Client is having a serious problem with the Contact Form Widget that I can not figure out how to correct.
    I created a website for a client and inserted a Contact Form widget on their 'Contact Us' page. Whenever anyone uses the form, the e-mail my client receive shows my e-mail address as the sender. So, when they 'reply' to the e-mail, the reply is sent to me and not the person who sent the original message. This creates a major problem in that I get barraged with e-mail replies while my client's potential customers go without a response.
    When I look at  'Site Manager > System E-Mails > Workflow Information > E-mail From Address' on the site's Admin Console, it shows my e-mail information. Is this is what needs to be changed?  If it is, what needs to be placed in that field so that the e-mail my client receives shows the senders e-mail information in the 'From' field.  My client wants to be able to click reply and have the message sent to the right party. They would be very upset if they have to cut and past the senders e-mail address from the body text on every contact they receive.
    Their feeling is that if I can't find a way to make the contact form work the way it should, then it's useless to them.
    Can anyone help me figure this out? I really don't want to disappoint my first client.

    Are you on a plan that has the CRM feature that stores your customers' data? If so, the idea of the contact form is that you'll receive a notification that there's been an inquiry filled out on your contact form and there should be a link in that email notification that leads to the "Case" that was created when that customer filled out a contact form.  You can click that link and visit the case for that customer in your BC site and reply to them from there so that all of the correspondence is logged in the CRM for safe-keeping and for your records.
    If your client finds this is too much work to login to BC to reply every time, then you should check to see if you have the "Customer Service Ticketing" feature on your hosting plan.  This is a feature where you create a dedicated email account (like [email protected]) and the BC system will automatically login to that email account and pull any emails in that inbox and convert them to a customer case for the sender of the email and then it will send out a notification via email to any of the BC Admin users you delegate as "Customer Service Agents".  Since the CST integrates with the BC CRM it lets you reply directly within the email-- but when you reply it will be going to that same email address dedicated to the CST but once the CST service checks your email again and sees that you replied to this inquiry it will log your reply against the customer's case and sends your reply via email back to them so that all the correspondance gets logged on BC's CRM but you can still reply via email.
    There's no way to use the default web forms to update the "From" or "Reply-To" address.. it must come from an approved email address to avoid spam issues.  On most web services you cannot change the "from" address anyway but usually you can at least specify the "Reply-To" address so that when someone hits "reply" in their email client it will reply to whoever you setup as the "Reply-To" address.
    Here's some more information about CST: http://kb.worldsecuresystems.com/kb/customer-service-ticketing.html?bc-partner
    I don't think the CST feature is in the webMarketing BC plan-- I think it's only in the webCommerce plan so if you have less than an webCommerce plan you have to tell your client to reply through BC by clicking the link in the notification they get.  You can justify it by saying its one or two more steps but it keeps the entire convo on record in their CRM for easy referral later.

  • Help with complex Acrobat forms

    Hi Everyone,
    Background: I worked with another developer and completed a form for one of our clients but I need to know if the below change requests are even possible and if so if anyone would like to help with finishing the form. I am definitely willing to pay for an experts services as long as this can be done in a timely manner.
    What the form is - Our client wants a form that has text fields, drop down boxes and pages where images can be placed into the file and arrows drawn on it to point where the images are located on other images (some images are store layout maps). They would like to send this file out to their store managers, have them fill it in and then they would like the completed forms sent back so all of the information that was filled in (names, store names, addresses, square footage, etc) can be gathered into a database or excel file.
    What is completed so far
    - Cascading drop down boxes (user clicks on first drop down and whatever is selected changes the second drop down options, etc)
    - Most of the text fields for information gathering including city, state, store manager etc
    - Metric unit conversion boxes
    - Header text fields (read only) are used on several of the pages and are a combination of choices made in the drop down boxes and text fields.
    - Page footer info including page number
    - The over all layout of the pages is set
    Requested changes/additions
    Major must have:
    - Page Addition - There is a product page in the form (page 10) and the different stores will have a different number of these products to enter into the form so is there a way to add an ADD PAGE button on the page that when pressed will copy the product page to make a new product page? Now the product page has cascading drop down form fields on it so I would want to make sure the form fields are separate iterations of the form fields not just a duplicate of what was on the product page.
    - Footer adjustments - If we can do the above of adding pages then is it possible to at that point adjust the footer to reflect the page number changes? The footer shows the current page number then the form name and date.
    - Gather info - What is the best way to distribute these forms so that when returned completed the information can be gathered? I tried distributing via email which seems to work ok but the files might end up being too large for email so what is the best way to gather the completed info if say the files were ftp'd back?
    Minor:
    There are several minor change requests that I know are doable or that if not possible we can disregard. One that I am not sure about is if the color of the arrows in Acrobat can be changed from the default red?
    At first I was assuming that the Clients that get the forms needed Acrobat Standard or Pro 8 or 9 because I thought that the only way to add images was to use the Touch-Up Tool under advanced tools and right click to Place images. However I am pretty sure that if Reader Rights is enabled that images can be copy pasted into the file too if this is incorrect please let me know.
    If the above is not doable or if there is a better solution other than Acrobat forms to gather client information including allow the client to add images and place arrows then please let me know your thoughts.
    Any help or suggestions would be greatly appreciated and again id like to commission this out to anyone who is up for the challenge.
    Thanks in advance
    Jason

    Perhaps a better question is does anyone know a good developer?

  • I've just came on board from Andriod and need massive help with the Contacts application any one out there willing to help the 'noob'?

    I had the folks at the store port over all of my contacts from my old
    ratty Andriod phone to my new shiny iPhone.
    however all 200+ of my contacts sort of "shook" out,
    meaning say John Smith, on my old phone,
    had in my contacts the following:
    John Smith
    123 Main St. Anytown, Anystate USA
    555-826-4879 home
    555-799-4247 cell
    [email protected]
    johnsmith@facebook
    all nice and neat on my andriod but when it ported over
    all that information was just scattered all over my contacts sort of like:
    john smith, smith john
    john smith 123 main st. etc.
    johhn smith home 555 etc.
    john smith cell 555 etc.
    john smith johnsmith@ etc.
    etc.
    so for all those 200+ contacts in my phone, I've got a zillion of them now...
    so I'd like to get this all back in order before I and Siri explode.
    I know nothing, and I know even less about outlook and the sort.
    But I do know I am in Dire need of help with this... I figured that eveything else
    involving iphones and apple in general was supposed to be cake but it seems
    like this is the only thing that isn't cake at all... unless, I'm just a right idiot. (which is possible, hence spelling and grammatical issues).

    I believe I've tried to sync it with google, but it didn't seem to take
    muchless take my calender. it seems to favor my facebook calender
    more over my google calender, but Siri seems to be helping me re-write
    it...but that's not the game here, it's the contacts. I've tried to export
    the cvp (??) list and import it into my iTunes account. However, It only
    doubled my issue because it didn't over write my existing contacts.

  • Does anybody know how to get help with this one?

    Hello there!  
    I wanted to get an advice on how to get in touch with the appropriate person at BT that could help with my situation.
    I have tried telephone help, complaints by email and unfortunately still waiting for somebody from the customer services to help me out.
    I have recently moved home.  I contacted BT on 26th June to organise the line transfer to the new address. The date was set for 18th July. I also ordered line rental saver and paid for it over the phone. All went smooth, telephone and broadband was working fine at the new place, but on the 23rd July I was sent an email that "BT is sorry that I am leaving". 
    I thought it was a mistake, but the lady in the on-line chat said somebody stopped my service. Later she rang and left a message saying that I must have requested to move to another provider. Did not manage to speak to her again, but phoned the help line this time.
    There a gentleman was trying to convince me that I called BT and cancelled my service on the 18th July and to him I was not a BT customer anymore. The truth is that I did not request to stop my service, anyway - why would I do that after paying for a year in advance. This has no logic, but because computer says so then he thinks I did it.
    He also added that my account is a 'mess'. He then promised that somebody would get in touch to sort it out as my line rental was gone and my phone and internet could go off any minute.
    I did not get any help. After that I wrote to them  3 email complaints to request assistance. They called and aknowledge they will help, but 3 weeks down the line nothing was done to explain the situation. Left the messages to the person from email complaints to ring me or email me -never happened.
    Last week I got 2 emails welcoming me to BT and outlining the call plans that were diferent from each other and the one I agreed to on the 25th June. When I called help line 2 days ago a lady confirmed on which one I am on, but could not sort out the most annoying thing - the 'final' bill. 
    I was sent a bill for over 200 pounds due to premature termination of phone and broadband service , which I never ordered. They already took the money this week. My line saver is gone as well. So I am 360 pounds short. I aslo have no access to myBT to monitor my phone activity or make orders.They also did not send any confrimation of the call plan I am currently on.
    It is a very annoying situation, because somebody at BT made an error and I am unable to get to anybody that could help. Everytime you call the help line you speak to somebody else and despite me thinking the email complaints would be the way forward they are not. Would appreciate some advice on how to tackle these issues: false accusations from them, inappropriate billing, problem with myBT.
    Thanks Lukasz

    Hi lbadek
    I can help with this please send us an email using the contact the mods link in my proifle and we will investigated from there.
    Thanks
    Stuart
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry that we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)

  • Need help with Adobe Interactive Form Saving

    Hi Gurus,
    I need your help with Adobe Interactive form saving.
    I have written the code in pre-save event to prompt a message when user didn't enter any value before saving. The form data should not be saved upon clicking save (Just prompt the message and exit form the form). Can u please advice me how to do this.
    Regards,
    Srini

    see the link: http://forms.stefcameron.com/2008/04/
    it says:
    preSave: Failed validations will not prevent the form from being saved however Acrobat/Reader will issue a special warning message, after issuing the validation error message, to inform the user that the validations failed. Iu2019m guessing this is because the user may be saving the form to continue filling it at a later time so the save canu2019t be completely prevented.
    regards,
    BJagdishwar.

Maybe you are looking for

  • Steps to migrate SQL Database to Windows/Oracle

    hi We have an SQL database in our client network and client wants to migrate it to Windows/Oracle. Currently they have multiple databases on the same SQL server. So I am curious to know if oracle also allows the same in Windows. I read that we can in

  • My notebook cannot save ac power ; it sudden shut-down when I plug-off . Battery has expired??

    Is there HP center at Puntip Pratunuum ,Bangkok,Thailnd?  I  want to check and repair  my  NB. Thank  you. This question was solved. View Solution.

  • Saving crm confirmation

    Hi Prof's, When saving the confirmation order in sap crm with spare parts am getting the following error. customer is already entered in the confirmation order: No customer could be determined for technician with personnel number 0000721 (Notificatio

  • "find file" doesn't work

    The "find" function generally works, but when I try to find a file by name, it always returns "0". It works if I search for date, etc. I tried reloading the operating system--no change.

  • Remote Assistance in Corporate Environment - OfferRA not working

    Can anyone help me resolve a long running issue regarding Remote Assistance on Windows 7? We have recently upgraded many of our PCs from XP to Win7 but our Helpdesk are no longer able to use Remote Assistance on the Win7 PCs so I've been trying to ge