Mass Email ?
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
- momo61
- Posts: 1648
- Joined: Fri Jun 06, 2008 2:05 pm
- Location: Europe
Mass Email ?
Hello guys,
Im in need of some support. Just wondering, what is the best way to send an Email to all the email-addresses registered in the "account" table ?
// momo61
Im in need of some support. Just wondering, what is the best way to send an Email to all the email-addresses registered in the "account" table ?
// momo61
-
- Posts: 34
- Joined: Tue Sep 08, 2009 9:15 am
Re: Mass Email ?
make a small while loop in php...this has some downsides tho... make sure u use correct headers. and have decent mailserver to keep up with the loop, if you want a simple code lemme know.
- Aikimaniac
- L2j Inner Circle
- Posts: 3048
- Joined: Sun Aug 07, 2005 11:42 pm
- Location: Slovakia
- daedalus
- Posts: 155
- Joined: Sun Mar 12, 2006 12:16 pm
- momo61
- Posts: 1648
- Joined: Fri Jun 06, 2008 2:05 pm
- Location: Europe
Re: Mass Email ?
Hmm ... I'd like to send am email to 200 persons at a time, and there is a chance that an email will turn up twice or even more times since I allow 1 email for many accounts.Danoontje wrote:make a small while loop in php...this has some downsides tho... make sure u use correct headers. and have decent mailserver to keep up with the loop, if you want a simple code lemme know.
I'd appreciate it if you could share a code for that

- DrHouse
- L2j Inner Circle
- Posts: 912
- Joined: Mon Jan 22, 2007 12:14 am
- Location: Spain
Re: Mass Email ?
Take care of php configs, sometimes a php cannot be running for more than a preconfigured interval

Leadership and management are not talk and talk, but talk and do
Proud of being a part of this project
- janiii
- L2j Veteran
- Posts: 4269
- Joined: Wed May 28, 2008 3:15 pm
- Location: Slovakia
Re: Mass Email ?
momo61 wrote:Hmm ... I'd like to send am email to 200 persons at a time, and there is a chance that an email will turn up twice or even more times since I allow 1 email for many accounts.Danoontje wrote:make a small while loop in php...this has some downsides tho... make sure u use correct headers. and have decent mailserver to keep up with the loop, if you want a simple code lemme know.
I'd appreciate it if you could share a code for that
Code: Select all
SELECT distinct(email) FROM accounts;
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper ♀
I don't give private support - PM will be ignored!
forum flOOder dancing dEVILoper ♀
I don't give private support - PM will be ignored!
-
- Posts: 26
- Joined: Sun Jul 09, 2006 7:53 pm
Re: Mass Email ?
You can use this since it's really easy and all you have to do is plug in the variables like DB name, DB user, Table and Column for users and e-mails. You might have to make a few small code changes to customize it to your needs but I'm sure it would be a small amount if any.
http://www.hotscripts.com/listing/simpl ... der-89526/
http://www.hotscripts.com/listing/simpl ... der-89526/
- momo61
- Posts: 1648
- Joined: Fri Jun 06, 2008 2:05 pm
- Location: Europe
Re: Mass Email ?
no offence to you, but that seems kinda ... i dont know. It requests my db password and name. I don't think that's necessary. All I want to do is to add the emails and send out one message to all.neo25 wrote:You can use this since it's really easy and all you have to do is plug in the variables like DB name, DB user, Table and Column for users and e-mails. You might have to make a few small code changes to customize it to your needs but I'm sure it would be a small amount if any.
http://www.hotscripts.com/listing/simpl ... der-89526/
- Copyleft
- Posts: 253
- Joined: Fri Feb 01, 2008 9:39 pm
Re: Mass Email ?
Haven't looked at the script yet but... how is it going get the data from the table if the database is password protected?..momo61 wrote:It requests my db password and name. I don't think that's necessary.
- momo61
- Posts: 1648
- Joined: Fri Jun 06, 2008 2:05 pm
- Location: Europe
Re: Mass Email ?
No, i mean, its not necessary to provide my password for simply sending out emails, and I dont want any script to have access to any table of the database.Copyleft wrote:Haven't looked at the script yet but... how is it going get the data from the table if the database is password protected?..momo61 wrote:It requests my db password and name. I don't think that's necessary.
- janiii
- L2j Veteran
- Posts: 4269
- Joined: Wed May 28, 2008 3:15 pm
- Location: Slovakia
Re: Mass Email ?
the only idea of the php script is:
so you just need to have your own array of email addresses, loop through it and send the email.
Code: Select all
while ($query = mysql_fetch_array($resultquery)) { $emailinfo=$myemail; $mailto=$query[$table_email]; mail($mailto, $subject, $messagesend , "From:".$fromadmin."\nReply-To:".$fromadmin."\n"); echo 'Mail sent to '.$mailto.'<br>'; sleep($seconds); }
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper ♀
I don't give private support - PM will be ignored!
forum flOOder dancing dEVILoper ♀
I don't give private support - PM will be ignored!
- DrHouse
- L2j Inner Circle
- Posts: 912
- Joined: Mon Jan 22, 2007 12:14 am
- Location: Spain
Re: Mass Email ?
If you dont provide the connection data to the script how are you going to parse the emails?momo61 wrote:No, i mean, its not necessary to provide my password for simply sending out emails, and I dont want any script to have access to any table of the database.Copyleft wrote:Haven't looked at the script yet but... how is it going get the data from the table if the database is password protected?..momo61 wrote:It requests my db password and name. I don't think that's necessary.

BTW looks like now you are concerned on security


Leadership and management are not talk and talk, but talk and do
Proud of being a part of this project
- Aikimaniac
- L2j Inner Circle
- Posts: 3048
- Joined: Sun Aug 07, 2005 11:42 pm
- Location: Slovakia
Re: Mass Email ?
you must first try to explain him how to correctly setup access rights and how to create new user maybeDrHouse wrote:If you dont provide the connection data to the script how are you going to parse the emails?![]()
BTW looks like now you are concerned on securitystart by not using root

- momo61
- Posts: 1648
- Joined: Fri Jun 06, 2008 2:05 pm
- Location: Europe
Re: Mass Email ?
I know how to correctly setup access rights. I use multiple users for various things and scripts, so there's no problem there. What I could do is download all the accounts table, and then delete all the account info except for the email. I'd then install it on my home-PC and send out the email.Aikimaniac wrote:you must first try to explain him how to correctly setup access rights and how to create new user maybeDrHouse wrote:If you dont provide the connection data to the script how are you going to parse the emails?![]()
BTW looks like now you are concerned on securitystart by not using root