Results 1 to 11 of 11

Thread: e-mail

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date: Jan:2017
    Location: Bulgaria
    Posts: 146

    e-mail

    PHP, e-mail , .
    ?

    <?php

    if(isset($_POST['sendmail'])){
    //
    $name = $_POST['name'];
    $email = $_POST['email'];
    $msg = $_POST['msg'];

    //
    if($name == ""){ echo " !"; }

    //
    elseif($email == ""){ echo " e-maila"; }

    //
    elseif($msg == ""){ echo " "; }

    //
    else{
    $msg2 = "$name :\n\n$msg\n\n : $email";
    if(mail("@.com", "- ", $msg2, "From: $email\r\nReply-to: $email\r\n")){
    echo " !";
    }else{ echo " !"; }
    }
    }

    ?>

    //

    <form method="post" action="mail.php">
    : <input type="text" name="name" /><br />
    E-mail: <input type="text" name="email" /><br />
    : <textarea name="msg" cols="50" rows="6"></textarea><br />
    <input type="submit" name="sendmail" value="" />
    </form>

  2. #2
    Registered User
    Join Date: Sep:2006
    Location: everywhere
    Posts: 348
    . ...
    . ( , , HTTP server). ( ) .

  3. #3
    Mire-x
    Join Date: Apr:2005
    Location: Sofia
    Posts: 763
    Quote Originally Posted by bradata View Post
    ...
    , , * , !...
    ------
    * , , .
    Last edited by Tarvin; 27th April 2017 at 19:11.
    (10b) || !(10b)

  4. #4
    Registered User
    Join Date: Jan:2017
    Location: Bulgaria
    Posts: 146
    Quote Originally Posted by Tarvin View Post
    , , * , !...
    ------
    * , , .

    Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\xampp\htdocs\tutorialspoint\mail.php on line 21

  5. #5
    Registered User
    Join Date: Feb:2005
    Location: ,
    Posts: 181
    25 localhost. php SMTP smtp_port, , . http://php.net/manual/bg/mail.configuration.php. (open relay). - Linux apache php . . Windows, .

  6. #6
    Registered User tedych's Avatar
    Join Date: Nov:2003
    Location:
    Posts: 17,654
    Windows - hMailServer - , . .
    production . . MS SQL Compact , mysql.

  7. #7
    Registered User
    Join Date: Jan:2017
    Location: Bulgaria
    Posts: 146
    Quote Originally Posted by bradata View Post
    . ...
    . ( , , HTTP server). ( ) .
    firefox. XAMPP. , :
    if(isset($_POST['sendmail'])){
    //
    $name = $_POST['name'];
    $email = $_POST['email'];
    $msg = $_POST['msg'];

    PHP.

    phpmyadmin, ?

  8. #8
    Registered User
    Join Date: Oct:2013
    Location: GB
    Posts: 340
    - , . -> xampp-a - apache\logs\error.log
    - / .
    Last edited by gan4o; 27th April 2017 at 21:46.

  9. #9
    Registered User
    Join Date: Jan:2017
    Location: Bulgaria
    Posts: 146
    Quote Originally Posted by gan4o View Post
    - , . -> xampp-a - apache\logs\error.log
    - / .

  10. #10
    Registered User SeT's Avatar
    Join Date: Aug:2002
    Location: Sofia
    Posts: 6,864
    XAMPP . postfix . . PHP .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |