How would I do this?

Soldato
Joined
2 Oct 2004
Posts
4,362
Location
N.W London
Hi,

Website n00b here....need some expert advice please...

Ok as you know well some of you I volunteer for a charity...

They have asked me to research setting up a newsletter on the web which they can email all their sponsors and donors once a quarterly or once a month to advise them of how their money is being spent etc etc....

They already have a website, which supports php, mysql and they have a list of 300 - 400 contacts of course all email addresses....

How would we set this up? whats the easiest way?

Ideally it would be great if we could create 1 newsletter and click send or do the necessary so all contacts recieve the newsletter...

All ideas and help would be most appreciated..

Thanks in advance for any replies I recieve

Cheers!
 
Hopefully all the email addresses are in one place. In an email program like outlook or a database or something. If they are in outlook already just make the newsletter in an email and bcc it to the entire list? If database, you can use php to connect to the database, send an email containing the info to the first email, send to the next in the list etc.
 
well its lucky you asked how they organise their data...

well they dont at the moment....

they have divided all their contacts based on certain critieria in notepad files...

yep thats right...so loads of notepad files containing emailing addresses...

so how would it be best for me to help them sort this mess out?

Apparently they cannot email 300 - 400 accounts at once with AOL as they get classed as a spammer or something...

I thought I could upload them all in some format to their webserver and use a php script or something similar to help achieve this task?

What do you think?

I dont know how best to go about it therefore I would really really appreciate all ideas and help

Thanks
 
Yes you're right, php script from a database I reckon. Might be a bit of a job though...

First make the database. I don't know the finer points but hopefully your server has some mysql capability. Make a mysql database with a column for email address, name and any other info which is important.

Make a php script containing the code for the flyer. First it connects to the database and loads everything in it. It then reads the first row, and sends an email to that person containing the code for the flyer. It then goes to the next row and repeats.

Shouldn't be too hard. Might be a pain making the database though. And learning the php code, which I've sadly forgotten after so long without coding in php :(
 
now we talking..so:

mysql ---> database
php --> send out emails...

I have no knowledge or have I ever worked with mysql, I know 1% of php...

so therefore now we have come to the decision mysql and php would be the best way to do this, does anyone know where I can get scripts which I can use to do this for me?

I realise I will have to input each email address but hey you cant win them all...

all advise on acquiring mysql and php scripts to help me achieve this task would be mostly appreciated....i would be eternally grateful

thanks in advance

cheers!!
 
don't code one up

there's a really good one on the net, and it's free ... I have it working on one of my sites

// gonna have a look for it ... post back in a bit

it's really easy to use and setup and it works!
 
blade you would be doing the charity a great service my friend if you could help me out on this......words cant describe how much of a help this would be if you delivered....

look forward to hearing from you shortly...

thanks joeyjoe appreciate your input my friend...will read up on that link whilst I wait for blade...

Cheers guys you both rock :)
 
Riiight. This is a jumble of code I nabbed from the above link and here.

Code:
<?php 
mysql_connect("server", "username", "password");
mysql_select_db("database")
 
$result = mysql_query("SELECT * FROM emails")

$message = '
<html>
<head>
  <title>Newletter title</title>
</head>
<body>
  Content here
</body>
</html>
';

// To send HTML mail, the Content-type header must be set
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

// Loop until youve done them all
while($row = mysql_fetch_array( $result )) {
   
// Additional headers
$headers .= 'To: ' . $name . ' <' . $email . '>' . "\r\n";
$headers .= 'From: Your name <[email protected]>' . "\r\n";

mail($name, "Email subject", $message, $headers);
}
?>

Might work, might not (probably not :p ). Relies on a database called "database" with a table called "emails" and columns called "name" and "email".

Edited for loop
 
Last edited:
sorry OP. The script was about 6 months ago when I picked it up ... now that version has gone .. and they've put a "Pro" tag on it ... and it costs money.

Sorry, should have checked before.

Phplist is free, but it will destroy your brain.
 
a php script could be made to extract the emails from the txt files to mysql couldn't it? that would save some time by the sounds of it.

it's out of my depth though, so just an idea..
 
Last edited:
Yes I was thinking that. It depends on the format, like if its email address then name, in quotes etc. Worth doing though I would have thought.
 
Back
Top Bottom