|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
I read something a while ago saying that when you writing a mailing list script, you should send one e-mail with all the recipients as BCC©
I want to have an unsubscribe link at the bottom of the e-mail that is customized for each user© Something like URL so that the person that gets the e-mail can be removed by clicking on that link© Is there a way that I can do this if I am BCCing the e-mail©©©©©and should I even be using BCC or some other method? not sure if this is important, but the server is running sendmail© |
|
#2
|
||||
|
||||
|
Not sure where you read this about the Bcc emails. but a simple mailing list can be sent to individuals simply by looping thru a data file, extracting the email address and sending and email to each on. Then each person receives a separate personalized email. I written many mailing list scripts, some with over 45,000 email addresses, and that's the way it's basically set up. There are some restrictions, depending on your server. It's best to use a SMTP mail server if you can, instead of sendmail. Sendmail has tendency to be somewhat sluggish. Also, if your MX records for your mail server are not set up right, you can also have some problems, usually alot of bounced emails.
Mickalo
__________________
Thunder Rain Internet Publishing Custom Programming & Database development Providing Personal/Business Internet Solutions that work! |
|
#3
|
|||
|
|||
|
thanks for the reply© It may have just been a coincidence, but when I sent my first e-mail out to the list of about 30 people, it took quite a while before it returned the html that said it finished© I tried it a number of times before using 1 or 2 e-mail addresses and it was a lot faster©
I guess that was why I asked the question in the first place© I thought it woul crash and burn if more users were added©©©©©but I think I have some room if you have done 45000© is there a way to check and see if e-mail addresses are valid? say if I send out an e-mail to an address and it gets returned, that address is logged© If this happens 3 times on one address then that address is removed from the list© I might be getting in over my head, but that would be pretty cool© |
|
#4
|
||||
|
||||
|
You can use a function called fork(), that will speed up the process, it spawns a child process to send out all the email, in the background, and displays the confirmation page right away, while the email is actually being sent.
there's no real way to check the validity of an email address, other then checking the synatx of each address as it goes out to make sure it's in a valid format. I have seen a module which actually "talks" with the mail server of the email address that's being sent, prior to sending the email, but if you have a consideraly large mailing list, this would be not very partical and would probably time out before all the email address we're sent. When an email address bounces or produces a fatal mail server error, it's normally sent back to your root POP3 account. |
|
#5
|
|||
|
|||
|
with regards to fork¥¤, should I create a process for each e-mail, or just for the sub-routine that sends the e-mail?
Thanks for bailing me out again mickalo |
|
#6
|
||||
|
||||
|
Here is a sample of how you might use fork() for your mailing list:
Code:
$pid = fork();
print ("Content-type: text/html \n\n")
print "fork failed: $!" unless defined $pid;
if ($pid) {
# spawn parent
# display mail sent confirmation page
exit(0);
} else {
# spawn child
close (STDOUT);
# Now Process mass mailer here
}
Hope this helps ![]() Mickalo |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > Custom messages in mailing list |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|