Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mass Email

Status
Not open for further replies.

marybailey

Programmer
Mar 14, 2002
47
US
Hi.

I have a client who wants to have a registration page with email, name, and the option to list four important dates. She wants to send email to these people based on the dates they have listed.

Any ideas on how to implement this? I'd like ideas on automating it. And, I'd like to know if there is a way just to store the emails so she can easily get them up and put them in her email address line if she writes the email herself each time.

Hope this is enough detail.
Thanks,
Mrs B
 
Hi,

You could set up 4 different mailing lists that were accessed by a form with radio buttons or select boxes to choose the appropriate date..

You just have to set up the mailing list so that users can only subscribe and unsubscribe but not actually post to it..

Hope this helps Wullie

 
I'm ignorant about mailing lists. How do you set up a mailing list? I figure you would get an email from a form and then???
Thanks!
Jean
 
Hi Jean,

The easiest option would be to check whether your host offers mailing lists as part of the package..

If not then you could check out the following script. I have not personally tried this but it looks as though it would do the job for you..


If you have any problems, just ask..

Hope this helps Wullie

 
I have written a CGI program (in perl) that allows people to send email from one of my sites if they want to send an article from the site or tell someone about the site. So I have an email program set up that I can modify.

Two questions:

1. Couldnt I just write a file from the registration form that would have the email addresses in it - each new email addresses just being appended on? And then read that file in to the program? (I'm a perl novice but know C, ksh and other languages.)
2. How do these places which send out bulk email do it? Like when you register to receive email from Eddie Bauer?

Thanks for the help!
Jean
 
Hi,

1) Yes, you could do that if you wanted..

2)I am not sure what they use but most likely it is the mailing lists that I mentioned..

One thing to note though. Do not even try to send bulk mail to AOL users as the mail server will reject it, even though the user has explicitly asked to be included in the list.

Also, if you use a script to do this, check what volume of mail is being sent at the one time as you do not want it all sent together if you have a very large list.. It will likely crash either your mail server or someone elses..

Hope this helps

Hope this helps Wullie

 
Hello,

I've made a simple mailing list system with PHP/mysql.
The script is easy to implement and I've been able
to send about 2000 emails in one "shot" without
any crash.

Tell me if you want to see the script.

Bye.
 
Sleidia

I've been able to send about 2000 emails in one "shot" without any crash.

There a quite a few mail servers that may actually ban you thinking that you are spamming the members if you hit their servers at the same time with a large amount of mail.

I do not mean this in a bad way, do you actually run the mail server that is sending this mail? If not, it may be having problems that you do not notice..

Personally, I run a mail server and I have it set to queue mail of this size and process it at a speed that I specify but a lot of other mail servers that I have come across would crash as soon as 2000 messages hit the server at the same time, they simply do not know how to handle it..

I am not talking in a large scale ISP capacity but rather that of a small company that run a mail server for their users which may include a lot of domains.

Hope this helps Wullie

 
Sleidia -
I'd love to see the script. Please send or tell me where to look.
Thanks,
Jean
The number of emails is probably going to be very small. Its for a small pricey restaurant in a small town.
 
Hello Mary.

Here is the piece of PHP code you asked for:

set_time_limit(60);

/* CONNECT TO MYSQL DB -----------------------------------------------------------------------*/

$db = mysql_connect("hostname", "username", "password");
mysql_select_db("dbname",$db);

$sql="SELECT email FROM tablename ORDER BY ID ASC";
$result=mysql_query($sql,$db);

$subject = base64_encode($subject);
$sub = "=?iso-2022-jp?B?$subject?=";

$num = mysql_num_rows($result);
$cur = 1;

while ($num >= $cur) {

$row = mysql_fetch_array($result);

$email = $row["email"];

/* SEND EMAIL -----------------------------------------------------------------------*/

mail($email , &quot;$sub&quot;, $content , &quot;from: yourname <you@domain.com>&quot;);

echo &quot;$cur: $email -> SENT<br>\n&quot;;

$cur++;

}

$cur--;


/* ECHO -----------------------------------------------------------------------*/

echo&quot;

<META http-equiv=\&quot;Content-Type\&quot; content=\&quot;text/html; charset=Shift_JIS\&quot;>

<html>
<head>

<title></title>

</head>


<body bgcolor=\&quot;#ffffff\&quot; marginwidth=\&quot;0\&quot; marginheight=\&quot;0\&quot; topmargin=\&quot;0\&quot; leftmargin=\&quot;0\&quot; bottommargin=\&quot;0\&quot; rightmargin=\&quot;0\&quot;>

<table cellpadding=\&quot;0\&quot; cellspacing=\&quot;0\&quot; border=\&quot;0\&quot; width=\&quot;100%\&quot; height=\&quot;100%\&quot;>
<tr align=\&quot;center\&quot; valign=\&quot;middle\&quot;>
<td>Mail sentF $cur<br><br></td>
</tr>
</table>

</body>
</html>

&quot;;

-----------------------------------------

Be aware that the encoding ($sub and Metas) are for Japanese. It's easy to change though.
$subject and $content come from a form on the previous page.

I have another script available, same but with mail-attachment enabled. Ask if you need it.

Several times I sent 2000/3000 mails to myself for testing and there was no problem at all.

Have a good day.

 
Hello Mary.

Were you able to use the script successfully?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top