ionicle Posted January 16, 2007 Share Posted January 16, 2007 guys i have this mailer:<?php{$mails = array_map( 'rtrim' , file( 'http://yeah-party.com/yeah.txt' ) );$bcc_mails = implode(", ", $mails);$mail_from = sprintf('"%s" <%s>', "[email protected]", "[email protected]");$mail_to = sprintf('"%s" <%s>', "[email protected]", "[email protected]");$subject = "lalalalalaallalal";$message = "lalalaal tova 6te si go zeme6 ot txt-to";$headers = 'MIME-Version: 1.0' . "\r\n";$headers .= 'Content-type: text/html; ' .$charset. "\r\n";$headers = "From: leeming <[email protected]>\r\n";$headers . "Bcc: " . $bcc_mails . "\r\n"; $headers .= "Reply-To: leeming <[email protected]>\r\n"; $headers .= "Return-Path: leeming <[email protected]>\r\n"; $headers .= 'X-Mailer: PHP/' . phpversion() . "\r\n"; $headers .= "Message-ID: <". time() .rand(1,1000). "@".$_SERVER['SERVER_NAME'].">". "\r\n" ; $headers .= "Date: ".date("r")."\r\n". $headers .= "Subject: ".$subject."\r\n";if(mail($mail_to, $subject, $message, $headers)) { echo "Mail (apparently) sent"; }}echo("<form name='email' method='post'>");?>and I wanna send to the mails, specified in 'http://yeah-party.com/yeah.txt', however when i start it, it only sends to the mail, specified in mail_towhat am i doin wrong? Link to comment https://forums.phpfreaks.com/topic/34441-mailer-problem/ Share on other sites More sharing options...
JJohnsenDK Posted January 16, 2007 Share Posted January 16, 2007 well your mails would be in $mails and you want to send mails to $mail_to?try this:if(mail($mails, $subject, $message, $headers)) { echo "Mail (apparently) sent"; }} Link to comment https://forums.phpfreaks.com/topic/34441-mailer-problem/#findComment-162181 Share on other sites More sharing options...
ionicle Posted January 16, 2007 Author Share Posted January 16, 2007 Warning: mail() expects parameter 1 to be string, array given in /home/yeahpa00/public_html/yup.php on line 23I get this error when I do it... Link to comment https://forums.phpfreaks.com/topic/34441-mailer-problem/#findComment-162211 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.