Может у кого есть такой скрипт?

Discussion in 'PHP' started by Vlad&slav, 22 Jan 2010.

  1. Vlad&slav

    Vlad&slav Member

    Joined:
    1 Jan 2009
    Messages:
    207
    Likes Received:
    41
    Reputations:
    9
    http://steb.hut1.ru/
    этот :)
     
  2. Vlad&slav

    Vlad&slav Member

    Joined:
    1 Jan 2009
    Messages:
    207
    Likes Received:
    41
    Reputations:
    9
    И ещё мб ктонть знает как заставить письма приходить в важные
     
  3. Deathdreams

    Deathdreams Elder - Старейшина

    Joined:
    8 Nov 2008
    Messages:
    342
    Likes Received:
    116
    Reputations:
    5
    http://ru2.php.net/manual/en/function.mail.php
     
  4. Vlad&slav

    Vlad&slav Member

    Joined:
    1 Jan 2009
    Messages:
    207
    Likes Received:
    41
    Reputations:
    9
    пасибо конешно но нужен не мануал по php а исходник скрипта или хотябы хедеров
     
  5. Gifts

    Gifts Green member

    Joined:
    25 Apr 2008
    Messages:
    2,494
    Likes Received:
    807
    Reputations:
    614
    Vlad&slav
    PHP:
    <?php
    // multiple recipients
    $to  'aidan@example.com' ', '// note the comma
    $to .= 'wez@example.com';

    // subject
    $subject 'Birthday Reminders for August';

    // message
    $message '
    <html>
    <head>
      <title>Birthday Reminders for August</title>
    </head>
    <body>
      <p>Here are the birthdays upcoming in August!</p>
      <table>
        <tr>
          <th>Person</th><th>Day</th><th>Month</th><th>Year</th>
        </tr>
        <tr>
          <td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
        </tr>
        <tr>
          <td>Sally</td><td>17th</td><td>August</td><td>1973</td>
        </tr>
      </table>
    </body>
    </html>
    '
    ;

    // To send HTML mail, the Content-type header must be set
    $headers  'MIME-Version: 1.0' "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' "\r\n";

    // Additional headers
    $headers .= 'To: Mary <mary@example.com>, Kelly <kelly@example.com>' "\r\n";
    $headers .= 'From: Birthday Reminder <birthday@example.com>' "\r\n";
    $headers .= 'Cc: birthdayarchive@example.com' "\r\n";
    $headers .= 'Bcc: birthdaycheck@example.com' "\r\n";

    // Mail it
    mail($to$subject$message$headers);
    ?>
    Code:
    Note: The following RFCs may be useful: » RFC 1896, » RFC 2045, » RFC 2046, » RFC 2047, » RFC 2048, » RFC 2049, and » RFC 2822. 
     
    _________________________
    1 person likes this.
  6. imajo.ati

    imajo.ati Banned

    Joined:
    21 Feb 2008
    Messages:
    232
    Likes Received:
    62
    Reputations:
    8
    x-mail-priority: high
    или
    X-Priority: 1

    только твои письма будут снабжаться заголовком x-spam: probably spam (если будешь отправлять из-под mail.ru сервера)
     
    1 person likes this.
  7. Vlad&slav

    Vlad&slav Member

    Joined:
    1 Jan 2009
    Messages:
    207
    Likes Received:
    41
    Reputations:
    9
    нашел чёто похожее

    PHP:
    <?php
    if(!empty($_POST['sender_mail'])
        || !empty(
    $_POST['sender_message'])
        || !empty(
    $_POST['sender_subject'])
        || !empty(
    $_POST['sender_name']))
    {
        
    $to "yourname@yourdomain.com"// replace with your mail address
        
    $s_name $_POST['sender_name'];
        
    $s_mail $_POST['sender_mail'];
        
    $subject stripslashes($_POST['sender_subject']);
        
    $body stripslashes($_POST['sender_message']);
        
    $body .= "\n\n---------------------------\n";
        
    $body .= "Mail sent by: $s_name <$s_mail>\n";
        
    $header "From: $s_name <$s_mail>\n";
        
    $header .= "Reply-To: $s_name <$s_mail>\n";
        
    $header .= "X-Mailer: PHP/" phpversion() . "\n";
        
    $header .= "X-Priority: 1";
        if(@
    mail($to$subject$body$header))
        {
            echo 
    "output=sent";
        } else {
            echo 
    "output=error";
        }
    } else {
        echo 
    "output=error";
    }
    ?>

    Sending mail with extra headers and setting an additional command line parameter. mail("nobody@aol.com", "the subject", $message, "From: webmaster@$SERVER_NAME", "-fwebmaster@$SERVERNAME");
    You can also use fairly simple string building techniques to build complex email messages.
    Sending complex email.
    PHP:
    /* recipients */ $recipient .= "friend_name " ", " //note the comma
    $recipient .= "next_friend " ", ";
    $recipient .= "onemore@greatsite.net";
    /* subject */
    $subject "Checking PHP mail";
    /* message */
    $message .= "This is a test mail \n";
    /* you can add a stock signature */
    $message .= "-\r\n"//Signature delimiter
    /* additional header pieces for errors, From cc's, bcc's, etc */
    $headers .= "From: The great webmaster \n";
    $headers .= "To-Sender: \n";
    $headers .= "X-Mailer: PHP\n"// mailer
    $headers .= "X-Priority: 1\n"// Urgent message!
    $headers .= "Return-Path: \n"// Return path for errors

    /* If you want to send html mail, uncomment the following line */

    // $headers .= "Content-Type: text/html; charset=iso-8859-1\n"; // Mime type
    $headers .= "cc:birthdayarchive@php.net\n"// CC to
    $headers .= "bcc:birthdaycheck@site.net, birthdaygifts@site.net\n"// BCCs to
    /* and now mail it */
    mail($recipient$subject$message$headers);