Apache2Triad Help, Support and Development Forum Index Search Profile Log in to check your private messages Log in Register Memberlist Attachments Statistics Crew/Ranks Archive
 Mail List - Mass Mail Program included
Google
Post new topic Reply to topic
Author Message
mastertr
 
 


Joined: 24 Jul 2006
Posts: 24

PostPosted: Mon Nov 20, 2006 2:31 pm Reply with quoteBack to top

Hi all,

How can i create a mail list which all users of the domain is registered?

And nobody send mail to the mail list, except creator.

Thanks...


Last edited by mastertr on Wed Nov 22, 2006 2:29 pm; edited 1 time in total
View user's profileSend private message
cigraphics
 
 


Joined: 21 Aug 2005
Posts: 148
Location: Romania, Pitesti

PostPosted: Mon Nov 20, 2006 9:03 pm Reply with quoteBack to top

try with php/mysql and make a looping something like this
Code:
<?php
$query = mysql_query("SELECT * FROM `mail`");
while($row = mysql_fetch_array($query)){
mail("$row[to]", "MASS MAIL", "$_POST[message]");
}
?>

Hope you know how to make the tables
View user's profileSend private messageSend e-mailYahoo Messenger
mastertr
 
 


Joined: 24 Jul 2006
Posts: 24

PostPosted: Tue Nov 21, 2006 6:58 am Reply with quoteBack to top

i dont understand.

apache2triad's mail system has no SQL database.
users information is in a tab file.
and i dont know how to make a list. Sad
View user's profileSend private message
cigraphics
 
 


Joined: 21 Aug 2005
Posts: 148
Location: Romania, Pitesti

PostPosted: Tue Nov 21, 2006 11:44 am Reply with quoteBack to top

try to go to
Code:
http://localhost/phpxmail

user: postmaster@localhost or postmaster@domain.com
pass: the password that your typed when you installed a2t go to users and you have a mailing list i hadn't tried it but i think that could help you
View user's profileSend private messageSend e-mailYahoo Messenger
mastertr
 
 


Joined: 24 Jul 2006
Posts: 24

PostPosted: Tue Nov 21, 2006 11:49 am Reply with quoteBack to top

i have already use phpxmail, it is very useful.

but there is no mass mail function. it has mailing list function but you must reenter all user one by one.

and there are 500 users Confused
View user's profileSend private message
cigraphics
 
 


Joined: 21 Aug 2005
Posts: 148
Location: Romania, Pitesti

PostPosted: Tue Nov 21, 2006 11:54 am Reply with quoteBack to top

i'm going to try to make a mass mailer from the mailusers.tab with php
View user's profileSend private messageSend e-mailYahoo Messenger
mastertr
 
 


Joined: 24 Jul 2006
Posts: 24

PostPosted: Tue Nov 21, 2006 12:16 pm Reply with quoteBack to top

thanks a lot Very Happy
View user's profileSend private message
cigraphics
 
 


Joined: 21 Aug 2005
Posts: 148
Location: Romania, Pitesti

PostPosted: Tue Nov 21, 2006 12:53 pm Reply with quoteBack to top

i think i did it Very Happy
Code:
<style type="text/css">
body {
color:#666666;
font-family:Arial, Helvetica, sans-serif;
font-weight:bold;
font-size:12px;
background-color:#FFFFFF;
}
input, textarea {
border:1px solid #999999;
}
a {
text-decoration:none;
color:#990000;
}
</style>

<?php
switch($_GET['do']){
default:
?>
<table align="center"><tr><td>
<form action="?do=send" method="post">
<input type="text" name="subject" /> Subject<br />
<textarea name="message" cols="30" rows="10"></textarea> Message<br />
<input type="submit" value="Send" />
</form></td></tr></table>
<?php
break;
case 'send':
$mailusers = "PATH TO THE mailusers.tab";
$a = file_get_contents($mailusers);
$d = explode("\n", $a);
$i=0;
$s = count($d);
echo "Sending emails to $s users<br />";
for ($i=0; $i<$s; $i++){
$re = str_replace('"', "", $d[$i]);
$ex = explode("   ", $re);
$subject = htmlspecialchars($_POST['subject']);
$message = htmlspecialchars($_POST['message']);
mail("$ex[1]@$ex[0]", "$subject", "$message");
echo "Email sent to: <b>$ex[1]@$ex[0]</b><br />";
}
echo "<a href=\"javascript:history.go(-1)\">Back</a>";
break;
}
?>
<center>&copy; 2004 - <?=date('Y');?> Copyright <a href="http://cigraphics.kb.ro">CIGraphics</a>.</center>


change this
$mailusers = "PATH TO THE mailusers.tab";
to something like this
$mailusers = "C:\apache2triad\mail\mailusers.tab";
do not modify this part
Code:
$d = explode("\n", $a);
$i=0;
$s = count($d);
echo "Sending emails to $s users<br />";
for ($i=0; $i<$s; $i++){
$re = str_replace('"', "", $d[$i]);
$ex = explode("   ", $re);


and this

Code:

mail("$ex[1]@$ex[0]".....
View user's profileSend private messageSend e-mailYahoo Messenger
mastertr
 
 


Joined: 24 Jul 2006
Posts: 24

PostPosted: Tue Nov 21, 2006 1:05 pm Reply with quoteBack to top

got these message,

Notice: Undefined index: do in D:\apache2triad\htdocs\toplu.php on line 27

switch($_GET['do']){
View user's profileSend private message
cigraphics
 
 


Joined: 21 Aug 2005
Posts: 148
Location: Romania, Pitesti

PostPosted: Tue Nov 21, 2006 1:11 pm Reply with quoteBack to top

try this one you must change $mailusers if the path is not correct and run localhost/form.php or domain/form.php
View user's profileSend private messageSend e-mailYahoo Messenger
mastertr
 
 


Joined: 24 Jul 2006
Posts: 24

PostPosted: Tue Nov 21, 2006 1:27 pm Reply with quoteBack to top

you did it, it works so good.

thanks a lot CIG Very Happy
View user's profileSend private message
cigraphics
 
 


Joined: 21 Aug 2005
Posts: 148
Location: Romania, Pitesti

PostPosted: Tue Nov 21, 2006 1:30 pm Reply with quoteBack to top

no probl
View user's profileSend private messageSend e-mailYahoo Messenger
mastertr
 
 


Joined: 24 Jul 2006
Posts: 24

PostPosted: Tue Nov 21, 2006 1:57 pm Reply with quoteBack to top

i add these lines, because of damaging of the message. (end of two character)
is it true?


Code:

if (strtoupper(substr(PHP_OS,0,3)=='WIN')) {
  $eol="\r\n";
} elseif (strtoupper(substr(PHP_OS,0,3)=='MAC')) {
  $eol="\r";
} else {
  $eol="\n";
}
..
..
..

$message .= $eol
mail(..
View user's profileSend private message
cigraphics
 
 


Joined: 21 Aug 2005
Posts: 148
Location: Romania, Pitesti

PostPosted: Tue Nov 21, 2006 2:13 pm Reply with quoteBack to top

or with nl2br
do this
$message = nl2br($_POST['message']);

i don't think that i understand what you are trying to say but you can contact me
Code:
cigraphics123[at]yahoo[dot]com
View user's profileSend private messageSend e-mailYahoo Messenger
mastertr
 
 


Joined: 24 Jul 2006
Posts: 24

PostPosted: Tue Nov 21, 2006 2:27 pm Reply with quoteBack to top

Embarassed

new error Crying or Very sad

Fatal error: Maximum execution time of 60 seconds exceeded in D:\apache2triad\htdocs\toplu\send.php on line 62

what should i do?
View user's profileSend private message
Display posts from previous:      
Post new topic Reply to topic


 Jump to:   



View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Powered by phpBB © 2001, 2002 phpBB Group :: FI Theme
All times are GMT