+ Reply to Thread
Results 1 to 4 of 4

Thread: PHP - Posielanie hromadnych emailov

  1. #1

    PHP - Posielanie hromadnych emailov

    Dobry den

    V php sa nevyznam moc dobre v podstate som uplny zaciatocnik

    Viem ze sa da cez PHP posielat email...

    A rad by som sa spytal ci sa da napisat ten php kod tak ze by som to poslal viacej ludom naraz... Teda ze zadam na odoslanie viacej emailovych adries

    A text spravy ? bol by som velmi rad keby sa to dalo spravit tak ze by neposielal len text ale keby to poslal ako html aby ten text spravy vyzeral aj po grafickej strane dobre . Napr. ze text bude :

    <p><strong><span style="color: #000000;">Ahoj, to som ja!</span></strong> <em>Tu to mas!&nbsp;</em><a href="http://koduj.cz/">http://koduj.cz/</a></p>

    Prosim vas vedeli by ste mi pomoct ? alebo nema niekto taky kod uz napisany ?

    Dakuje vam moc

  2. #2
    V principe by som ti odporucil stiahnut si PHPmailer a vyuzit ten ale uvediem ti aj jednoduchy priklad ako na to. Otazka je, ci udaje chces tahat s databazy alebo si ich sam napises do kodu. Tie adresi a texty emailov musis od niekadial natahat. Cize tu je script na odoslanei html emailu

    PHP Code:
    <?php 
        
    //change this to your email. 
        
    $to "m@maaking.com"
        
    $from "m2@maaking.com"
        
    $subject "Hello! This is HTML email"

        
    //begin of HTML message 
        
    $message "<html> 
      <body bgcolor=\"#DCEEFC\"> 
        <center> 
            <b>Looool!!! I am reciving HTML email......</b> <br> 
            <font color=\"red\">Thanks Mohammed!</font> <br> 
            <a href=\"http://www.maaking.com/\">* maaking.com</a> 
        </center> 
          <br><br>*** Now you Can send HTML Email <br> Regards<br>MOhammed Ahmed - Palestine 
      </body> 
    </html>"

       
    //end of message 

        // To send the HTML mail we need to set the Content-type header. 
        
    $headers "MIME-Version: 1.0rn"
        
    $headers .= "Content-type: text/html; charset=iso-8859-1rn"
        
    $headers  .= "From: $from\r\n"
        
    //options to send to cc+bcc 
        //$headers .= "Cc: [email]maa@p-i-s.cXom[/email]"; 
        //$headers .= "Bcc: [email]email@maaking.cXom[/email]"; 
         
        // now lets send the email. 
        
    mail($to$subject$message$headers); 

        echo 
    "Message has been sent....!"
    ?>
    Všetko o hrách a novinkách s herného sveta nájdete na http://the-guild.cz/.

  3. #3
    Tie emaily mam v TXT subore ... jeden email jeden riadok ...

    Inac stiahol som si ten PHPmailer a funguje SUPER !!

    Ale mam ejden velky problem ... Ukazuje mi chyby pri posielani mailov ktore mam v tom textovom subore

    Lebo niektore emaily su napsiane ako meno.priezvisko@nieco.sk .... A neposle ani jeden nmail .... lebo si mysli ze ta bodka konci mail a tym padom neposle ani jeden mail D

    Invalid address: .mokus@azet.skYou must provide at least one recipient email address. Invalid address: michalj@You must provide at least one recipient email address. Invalid address: ssdh@.comYou must provide at least one recipient email address.
    Last edited by klco; 22.01.2012 at 11:28.

  4. #4
    Nerozumiem na konci kazdeho emailu je bodka??
    Všetko o hrách a novinkách s herného sveta nájdete na http://the-guild.cz/.

+ Reply to Thread

Posting Permissions

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