Page 1 of 2 12 LastLast
Results 1 to 25 of 45

Thread:

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date: Mar:2009
    Location:
    Posts: 37

    e-mail. ,,e-mail .

  2. #2
    Registered User iMarh's Avatar
    Join Date: May:2002
    Location:
    Posts: 373

  3. #3
    Registered User tedych's Avatar
    Join Date: Nov:2003
    Location:
    Posts: 17,654
    , , , .
    - , , IP- , 1 .
    - captcha, .

    , .

  4. #4
    Registered User
    Join Date: Mar:2009
    Location:
    Posts: 37
    , ?

    Note: Normally these settings should be given to you by your host provider.
    Host (edit box) - Type here the hostname of the smtp server.
    Port (edit box) - Type here the port the smtp server runs on.
    Hello (edit box) - Type here some text to be sent as the HELO command (typically the hostname of the machine this script runs on).
    Authentication (check box) - Check this box if you will use basic authentication.
    Username (edit box) - If Authentication is checked, type username for authentication.
    Password (edit box) - If Authentication is checked, type password for authentication.

  5. #5
    Registered User tedych's Avatar
    Join Date: Nov:2003
    Location:
    Posts: 17,654
    , ?
    standalone smtp sockets ..
    mail() PHP.
    . hotscripts.com .

    ( - )
    host: localhost
    port: 25
    Helo: www
    .

  6. #6
    Registered User
    Join Date: Jan:2009
    Location:
    Posts: 122
    . mail() PHP ez .
    a CAPTCHA

  7. #7
    Registered User tedych's Avatar
    Join Date: Nov:2003
    Location:
    Posts: 17,654
    , captcha, , , , ..

    , .
    , , .

  8. #8
    Registered User
    Join Date: Mar:2009
    Location:
    Posts: 37
    CGI, Mailto Form, . , Tophost .

  9. #9
    Registered User tedych's Avatar
    Join Date: Nov:2003
    Location:
    Posts: 17,654
    , - "" , . , - .
    , , , - , , .

    , ..

    3 , , , -:

    $submit = (isset($POST['name']));
    if ($submit) {
    $name = $_POST['name'];
    $email = $_POST['email'];
    $text = $_POST['text'];
    $text = ": ".$name."\r\n".$text;
    mail("twoqt_email_adres", "KONTAKT FORMA", $text, "From: ".$email);
    header("Location: tekushtiq_script.php?sent=1");
    exit;
    }


    HTML- , " " message-:

    <?php
    if (isset($_GET['sent']) && $_GET['sent']=='1') {
    echo " ";
    }
    ?>

    , PHP, .

  10. #10
    Registered User
    Join Date: Mar:2009
    Location:
    Posts: 37
    , , .

  11. #11
    Registered User tedych's Avatar
    Join Date: Nov:2003
    Location:
    Posts: 17,654
    -. PHP- mail() .

  12. #12
    Registered User
    Join Date: Mar:2009
    Location:
    Posts: 37
    tophost , . webmail, .

  13. #13
    hmm BornToDrink's Avatar
    Join Date: Aug:2005
    Location: .
    Posts: 11,573
    mail().
    : yourdomain.com/webmail
    php :

    Code:
    <?php
    if (!isset($_POST['submit_mail'])) {
    ?>
    <form method="POST" action="">
    	<table>
    		<tr>
    			<td>Email: </td>
    			<td><input type="text" name="email"></td>
    		</tr>
    		<tr>
    			<td>Subject: </td>
    			<td><input type="text" name="subject"></td>
    		</tr>
    		<tr>
    			<td>Email text: </td>
    			<td><textarea style="width: 330px; height: 100px;" name="textBody"></textarea></td>
    		</tr>
    		<tr>
    			<td><input type="submit" value="Send Email" name="submit_mail"></td>
    		</tr>
    	</table>
    
    
    </form>
    <?php
    
    	
    }else {
    	$to = "yourmail@somemail.com";
    	$from = $_POST['email'];
    	$subject = $_POST['subject'];
    	$body = $_POST['textBody'];
    	$headers = "From: $from\r\n" . "X-Mailer: php";
    	if (mail($to, $subject, $body, $headers)) {
    		echo("<p>Message sent!</p>");
    	} else {
    		echo("<p>Message delivery failed...</p>");
    	}
    }
    ?>
    yourmail@somemail.com , .
    , , .

    ps - .. .
    Hey, mother, I come bearing a gift. I'll give you a hint. It's in my diaper and it's not a toaster.
    .

  14. #14
    Registered User
    Join Date: Mar:2009
    Location:
    Posts: 37
    , . webmail , .

  15. #15
    ! vbTheKing's Avatar
    Join Date: Sep:2003
    Location:
    Posts: 4,138
    Quote Originally Posted by infobg View Post
    , . webmail , .
    , !
    ''? * *
    - !
    ...

  16. #16
    Registered User
    Join Date: Mar:2009
    Location:
    Posts: 37
    , .
    form method="POST" action="contact.php">
    Name:
    <input type="text" name="name" size="19"><br>
    <br>
    E-Mail:
    <input type="text" name="email" size="19"><br>
    Message:<br>
    <textarea rows="9" name="message" cols="30"></textarea><br>
    <br>
    <input type="submit" value="Submit" name="submit">
    </form>


    "contact.php"


    <?php
    if(isset($_POST['submit'])) {
    $to = "mail@andrianivanov.com";
    $subject = "PHP FORM TEST";
    $name_field = $_POST['name'];
    $email_field = $_POST['email'];
    $message = $_POST['message'];
    $body = "From: $name_field\n E-Mail: $email_field\n Message:\n $message";
    echo "E-mail has been sent to $to!";
    mail($to, $subject, $body);
    } else {
    echo "The message was not delivered!";
    }
    ?>
    reset.

  17. #17
    hmm BornToDrink's Avatar
    Join Date: Aug:2005
    Location: .
    Posts: 11,573
    Quote Originally Posted by infobg View Post
    , .
    , ... , .
    , ?
    Hey, mother, I come bearing a gift. I'll give you a hint. It's in my diaper and it's not a toaster.
    .

  18. #18
    Registered User tedych's Avatar
    Join Date: Nov:2003
    Location:
    Posts: 17,654
    - , .
    .

    , , pop3/smtp Yahoo webmail , , .., , , , , php . ( - ).

    , , , - mail() .

  19. #19
    Registered User
    Join Date: Mar:2009
    Location:
    Posts: 37
    mail() . If . php.

  20. #20
    hmm BornToDrink's Avatar
    Join Date: Aug:2005
    Location: .
    Posts: 11,573
    if- mail() .
    ?! , , , .

    :
    Code:
    echo "E-mail has been sent to $to!";
    mail($to, $subject, $body);
    , , ... , , .

    PS - -, , , ( .. ).
    Hey, mother, I come bearing a gift. I'll give you a hint. It's in my diaper and it's not a toaster.
    .

  21. #21
    Registered User tedych's Avatar
    Join Date: Nov:2003
    Location:
    Posts: 17,654
    .

    , , , , , .

  22. #22
    Registered User
    Join Date: Mar:2009
    Location:
    Posts: 37
    Parse error: syntax error, unexpected '}' in /users/abv/public_html/documents/form.php on line 4
    , . php, , . reset , , Dreamweaver mail() php .

  23. #23
    , Rampage_rado's Avatar
    Join Date: Jul:2004
    Location:
    Posts: 3,100
    , ... , ...

    . , .. , ... ..

    <meta http-equiv="Content-Type" content="text/html; charset=windows-1251 " /> mail.php, :
    Code:
    <html>
    <body><?php
    if (isset($_REQUEST['Your_Email']))
    //if "email" is filled out, send email
      {
      //send email
      $email = $_REQUEST['Your_Email'] ; 
      $subject = $_REQUEST['Your_Subject'] ;
      $message = $_REQUEST['Your_Message'] ;
      mail( " ", " : $subject",
      $message, "From: $email" );
      echo "Thank you for using our mail form";
      }
    else
    //if "email" is not filled out, display the form
      {
      echo "<form method='post' action='mailform.php'>
      Email: <input name='email' type='text' /><br />
      Subject: <input name='subject' type='text' /><br />
      Message:<br />
      <textarea name='message' rows='15' cols='40'>
      </textarea><br />
      <input type='submit' />
      </form>";
      }
    ?></body>
    </html>
    . contacts.html ?

    - "":
    Code:
    <html>
    <head><title>PHP Mail Sender</title></head>
    <body>
    <?php
    
    /* All form fields are automatically passed to the PHP script through the array $HTTP_POST_VARS. */
    $email = $HTTP_POST_VARS['Your_Email'];
    $subject = $HTTP_POST_VARS['Your_Subject'];
    $message = $HTTP_POST_VARS['Your_Message'];
    
    /* PHP form validation: the script checks that the Email field contains a valid email address and the Subject field isn't empty. preg_match performs a regular expression match. It's a very powerful PHP function to validate form fields and other strings - see PHP manual for details. */
    if (!preg_match("/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/", $email)) {
      echo "<h4>Invalid email address</h4>";
      echo "<a href='javascript:history.back(1);'>Back</a>";
    } elseif ($subject == "") {
      echo "<h4>No subject</h4>";
      echo "<a href='javascript:history.back(1);'>Back</a>";
    }
    
    /* Sends the mail and outputs the "Thank you" string if the mail is successfully sent, or the error string otherwise. */
    elseif (mail(rado_2004@abv.bg,$subject,$message)) {
      echo "<h4>Thank you for sending email</h4>";
    } else {
      echo "<h4>Can't send email to $email</h4>";
    }
    ?>
    </body>
    </html>
    , ( , .) php ....

    Parse error: parse error in /var/www/html/mail.php on line 21 .

    :
    Code:
    <form action="mail.php" name="contact" method="post">
    							<fieldset>			
    								<label>: <br /><input type="text" name="Your_Name" /></label>
    								<label>E-mail: <br /><input type="text" name="Your_Email" /></label>
    								<label>: <br /><input type="text" name="Your_Phone" /></label>
    								<label>: <br /><input type="text" name="Your_Subject" /></label>
    								<label>: <br /><textarea name="Your_Message" rows="5"></textarea></label>							
    								<div id="submit"><input type="Submit" name="Submit" value="" id="btn_submit" /></div>	
    							</fieldset>
    			</form>
    !
    Last edited by Rampage_rado; 7th April 2009 at 20:40.

  24. #24
    Registered User tedych's Avatar
    Join Date: Nov:2003
    Location:
    Posts: 17,654
    Parse error-a e zaradi mail() .
    <input type="text" name="tel" />
    body- , .

    , , - . -
    header("Content-type: text/html; charset=windows-1251");

  25. #25
    , Rampage_rado's Avatar
    Join Date: Jul:2004
    Location:
    Posts: 3,100
    Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/mail.php:4) in /var/www/html/mail.php on line 5

    Thank you for sending email


    . . 1251 2 -...

    - ? ..

    : from . , " " ...

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 |