mehrere mails auf einmal?

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • mehrere mails auf einmal?

    wie kann man denn mehrere mails auf einmal schicken? habe es bis jetzt immer mit einer while-schleife erledigt, glaube aber, dass es da einen extra befehl gibt - oder?

  • #2
    Ansich ist das die richtige Lösung http://www.php-resource.de/forum/sho...&threadid=9433

    Natürlich kann man auch über den Header an BCC Empfänger adressieren:

    $headers .= "From: Name<mail@server.com>\n";
    $headers .= "X-Sender: <mail@server.com>\n";
    $headers .= "X-Mailer: PHP\n"; //mailer
    $headers .= "X-Priority: 3\n"; //1 UrgentMessage, 3 Normal
    $headers .= "Return-Path: <mail@server.com>\n";
    //Uncomment this to send html format
    //$headers .= "Content-Type: text/html; charset=iso-8859-1\n";
    //$headers .= "cc: birthdayarchive@php.net\n"; // CC to
    $headers .= "bcc: mail@server.com"; // BCCs to, separete
    multiple with commas mail@mail.com, mail2@mail.com

    more... http://www.php.net/manual/de/function.mail.php

    Kommentar


    • #3
      Original geschrieben von hand
      Ansich ist das die richtige Lösung http://www.php-resource.de/forum/sho...&threadid=9433

      Natürlich kann man auch über den Header an BCC Empfänger adressieren:

      $headers .= "From: Name<mail@server.com>\n";
      $headers .= "X-Sender: <mail@server.com>\n";
      $headers .= "X-Mailer: PHP\n"; //mailer
      $headers .= "X-Priority: 3\n"; //1 UrgentMessage, 3 Normal
      $headers .= "Return-Path: <mail@server.com>\n";
      //Uncomment this to send html format
      //$headers .= "Content-Type: text/html; charset=iso-8859-1\n";
      //$headers .= "cc: birthdayarchive@php.net\n"; // CC to
      $headers .= "bcc: mail@server.com"; // BCCs to, separete
      multiple with commas mail@mail.com, mail2@mail.com

      more... http://www.php.net/manual/de/function.mail.php

      zur "richtigen" lösung:
      und wie schiecke ich 10 oder 100 mails auf einmal und mit einem befehl?

      Kommentar


      • #4
        Naja über eine Schleife eben und das kommt auf Deine Applikation drauf an.

        PHP-Code:
        // Nur ein Beispiel
        $assignee[] = "hugo0@quaxi.xx";
        $assignee[] = "hugo1@quaxi.xx";
        $assignee[] = "hugo2@quaxi.xx";
        $assignee[] = "hugo3@quaxi.xx";
        $assignee[] = "hugo4@quaxi.xx";
        $assignee[] = "hugo5@quaxi.xx";
        $assignee[] = "hugo6@quaxi.xx";
        $assignee[] = "hugo.quaxi@quaxi.xx";

        while (list(
        $key$value) = each ($assignee)) {         
           
        mail($value"My Subject""Line 1\nLine 2\nLine 3");

        Kommentar


        • #5
          oder

          PHP-Code:
          // Nur ein Beispiel
          $assignee[] = "hugo0@quaxi.xx";
          $assignee[] = "hugo1@quaxi.xx";
          $assignee[] = "hugo2@quaxi.xx";
          $assignee[] = "hugo3@quaxi.xx";
          $assignee[] = "hugo4@quaxi.xx";
          $assignee[] = "hugo5@quaxi.xx";
          $assignee[] = "hugo6@quaxi.xx";
          $assignee[] = "hugo.quaxi@quaxi.xx";


          $headers "bcc: ";
          while (list(
          $key$value) = each ($assignee)) {
             
          $headers .= "$value, ";      
          }

          mail("anmich@selbst.xx""My Subject""Line 1\nLine 2\nLine 3",$headers); 

          Kommentar

          Lädt...
          X