htmla tzn zebym mogl maile w formacie html wysylac
funkcja formularza :
<?php function mail_form() { global $PHP_SELF, $acc, $op, $goto, $slist_from, $slist_head, $slist_foot, $slist_topic, $slist_from; if(have_access($acc['mail'])=='ok') { echo '<form enctype="multipart/form-data" name="form_1" method="post" action="'.$PHP_SELF.'?op='.$op.'"> <table border="0" cellspacing="3" cellpadding="0" align="center"> <tr> <td align="right" valign="top" class="uni_01">tytuł</td> <td> <input type="text" name="title" size="35" value="'.$slist_topic.'"> </td> </tr> <tr> <td align="right" valign="top" class="uni_01">od</td> <td> <input type="text" name="from" size="35" value="'.$slist_from.'"> </td> </tr> <tr> <td align="right" valign="top" class="uni_01">wstęp</td> <td> <textarea name="head" cols="55" rows="5">'.$slist_head.'</textarea> </td> </tr> <tr> <td align="right" valign="top" class="uni_01">treść</td> <td> <textarea name="text" cols="55" rows="15"></textarea> </td> </tr> <tr> <td align="right" valign="top" class="uni_01">stopka</td> <td> <textarea name="foot" cols="55" rows="5">'.$slist_foot.'</textarea> </td> </tr> <tr> <td align="right" valign="top" class="uni_01"> </td> <td> <input style="font-weight: bold;" type="submit" name="ok" value="wyślij"> <input type="reset" name="Reset" value="wyczyść"> <input type="hidden" name="goto" value="'.$goto.'"> <input type="hidden" name="cmd" value="send"> </td> </tr> </table> </form>'; } } ?>
funkcja wysyłająca maila :
<?php function send_mail() { $subject = $title; $text = make_clickable($text); { $to = $r['mail']; $m++; $body = ''; $r['keyid'] = str_replace('**link**', "$adres/subscribe.php?key=".$r['keyid']."&cmd=delete", $foot); $body = $head.$text.$r['keyid']; { $n++; } else { $n = (int) $n; $err++; } if($loop>20) { $loop = 0; } else { $loop++; } } if($m==$n) { add_log('pomyslnie wyslano wiadomosc do '.$n.' osob'); } } ?>