web_master Posted June 13, 2007 Share Posted June 13, 2007 Hi, how can I implement while query in email: $address = "info@internetlabor.net"; $subject = "Novi registrovani korisnik"; $message = "KORISNIK: <strong>".$request_user['tt_reg_name']." ".$request_user['tt_reg_fname']."</strong><br>". "E-MAIL: <strong>".$request_user['tt_reg_email']."</strong><br>". "GRAD: <strong>".$request_user['tt_reg_city']."</strong><br>". "TELEFON: <strong>".$request_user['tt_reg_phone']."</strong><br>". "IZABRANI PROIZVOD: <strong>".$request_product['tt_reg_product_choice']."</strong><br>". "IZABRANE GRUPE PROIZVODA:<br>". "this down is a problem between stars, to write in mail all query" ********************************************************************************* while ($request_user_choice = mysql_fetch_array($query)) { print "<strong>".$request_user_choice['tt_product_group_sr']."</strong><br>"; } ********************************************************************************* $headers = "From: info@internetlabor.net". "Reply-To: info@internetlabor.net" . "\r\n" . 'X-Mailer: PHP/' . phpversion() . "\r\n" . 'MIME-Version: 1.0' . "\r\n". 'Content-type: text/html; charset=iso-utf-8' . "\r\n"; mail($address, $subject, $message, $headers); thnxs? Quote Link to comment https://forums.phpfreaks.com/topic/55376-e-mail-while/ Share on other sites More sharing options...
gtk Posted June 13, 2007 Share Posted June 13, 2007 Man you are sending many mails why dont you use teh group_mail class from here Class aviliable from here http://zigmoyd.sourceforge.net/man/mail.php#group_mail Installlation and Instruction on http://zigmoyd.sourceforge.net/man/index.php Its really too easy and much better than mail. Quote Link to comment https://forums.phpfreaks.com/topic/55376-e-mail-while/#findComment-273719 Share on other sites More sharing options...
web_master Posted June 13, 2007 Author Share Posted June 13, 2007 Man you are sending many mails why dont you use teh group_mail class from here Class aviliable from here http://zigmoyd.sourceforge.net/man/mail.php#group_mail Installlation and Instruction on http://zigmoyd.sourceforge.net/man/index.php Its really too easy and much better than mail. no, I dont want to send a many mails... I have one while query for example: while ($request = mysql_fetch_array($query)) { $request_user_choice['tt_product_group_sr']."< br >"; } this will look like this after echo: something 1 something 2 something 3 ... in while query, I want to write this something1, something2 something 3.... in e-mail body... Quote Link to comment https://forums.phpfreaks.com/topic/55376-e-mail-while/#findComment-273722 Share on other sites More sharing options...
gtk Posted June 13, 2007 Share Posted June 13, 2007 Replace the mail($address, $subject, $message, $headers); with echo $message."\n"; echo $headers."\n"; test with it. Quote Link to comment https://forums.phpfreaks.com/topic/55376-e-mail-while/#findComment-273724 Share on other sites More sharing options...
web_master Posted June 14, 2007 Author Share Posted June 14, 2007 Replace the mail($address, $subject, $message, $headers); with echo $message."\n"; echo $headers."\n"; test with it. thnxs Quote Link to comment https://forums.phpfreaks.com/topic/55376-e-mail-while/#findComment-274380 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.