Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Linux, Apache, MySQL, PHP
  4. Contact form

Contact form

Scheduled Pinned Locked Moved Linux, Apache, MySQL, PHP
phphtmldatabasecomhosting
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    starr007
    wrote on last edited by
    #1

    Currently I am hosting a clients webpage on the free plan of Mezoka. They allow php 5, but not phpmail (), is there a way of that I can let users email the client at their Gmail account through the website? I read on the Mezoka forum that you could use Gmail as am smtp. I've included my php and html form. I've had a few people tell me about php mailers and php mailer class. Not too sure how to go about implementing the contact form. What I did and thought would work, doesnt, I keep getting the error message that I have in my php. I've tried using Gmail which is where the client has their email account with and my personal yahoo address, and error messages.

    Contact

    "; $to = "starr@yahoo.com";
    $from = " ";
    $headers = "MIME-Version: 1.0\r\n";
    $headers.= "Content-type: text/html; charset=iso-8859-1\r\n";
    $headers.= "From: $from\r\n";
    $mail_body = "Hello World";

    	if (mail($to,"Mail", $mail\_body,$headers))
    	{	echo " Thank you! - Your feedback has been sent! ";	}
    	else
    	{	echo " Thank you! - We could not send email. Please try later! ";	}
    

    ?>

    ?>

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Contact</title>

    </head>
    <body>

                    *   [![facebook](images/facebook.png)](http://www.facebook.com/)
            *   [![twitter](images/twitter.png)](http://www.twitter.com/)
    

    logo

    E V 2 Replies Last reply
    0
    • S starr007

      Currently I am hosting a clients webpage on the free plan of Mezoka. They allow php 5, but not phpmail (), is there a way of that I can let users email the client at their Gmail account through the website? I read on the Mezoka forum that you could use Gmail as am smtp. I've included my php and html form. I've had a few people tell me about php mailers and php mailer class. Not too sure how to go about implementing the contact form. What I did and thought would work, doesnt, I keep getting the error message that I have in my php. I've tried using Gmail which is where the client has their email account with and my personal yahoo address, and error messages.

      Contact

      "; $to = "starr@yahoo.com";
      $from = " ";
      $headers = "MIME-Version: 1.0\r\n";
      $headers.= "Content-type: text/html; charset=iso-8859-1\r\n";
      $headers.= "From: $from\r\n";
      $mail_body = "Hello World";

      	if (mail($to,"Mail", $mail\_body,$headers))
      	{	echo " Thank you! - Your feedback has been sent! ";	}
      	else
      	{	echo " Thank you! - We could not send email. Please try later! ";	}
      

      ?>

      ?>

      <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <title>Contact</title>

      </head>
      <body>

                      *   [![facebook](images/facebook.png)](http://www.facebook.com/)
              *   [![twitter](images/twitter.png)](http://www.twitter.com/)
      

      logo

      E Offline
      E Offline
      Evan Gallup
      wrote on last edited by
      #2

      Check the link out at the bottom, it's a PHP mailer library that should make it much easier to do what you're trying to accomplish. If you're still having trouble, just remember, Google is your friend! http://bit.ly/p9DUif[^] Literally every result on that first page should walk/help you through it. http://swiftmailer.org/[^]

      1 Reply Last reply
      0
      • S starr007

        Currently I am hosting a clients webpage on the free plan of Mezoka. They allow php 5, but not phpmail (), is there a way of that I can let users email the client at their Gmail account through the website? I read on the Mezoka forum that you could use Gmail as am smtp. I've included my php and html form. I've had a few people tell me about php mailers and php mailer class. Not too sure how to go about implementing the contact form. What I did and thought would work, doesnt, I keep getting the error message that I have in my php. I've tried using Gmail which is where the client has their email account with and my personal yahoo address, and error messages.

        Contact

        "; $to = "starr@yahoo.com";
        $from = " ";
        $headers = "MIME-Version: 1.0\r\n";
        $headers.= "Content-type: text/html; charset=iso-8859-1\r\n";
        $headers.= "From: $from\r\n";
        $mail_body = "Hello World";

        	if (mail($to,"Mail", $mail\_body,$headers))
        	{	echo " Thank you! - Your feedback has been sent! ";	}
        	else
        	{	echo " Thank you! - We could not send email. Please try later! ";	}
        

        ?>

        ?>

        <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Contact</title>

        </head>
        <body>

                        *   [![facebook](images/facebook.png)](http://www.facebook.com/)
                *   [![twitter](images/twitter.png)](http://www.twitter.com/)
        

        logo

        V Offline
        V Offline
        Vasudevan Deepak Kumar
        wrote on last edited by
        #3

        You can check out PhpClasses for a Php Smtp Library that communicates to Google Mail via network functions.

        Vasudevan Deepak Kumar Personal Homepage
        Tech Gossips
        The woods are lovely, dark and deep, But I have promises to keep, And miles to go before I sleep, And miles to go before I sleep!

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups