Welcome Guest ( Log In | Register )



2 Pages V   1 2 >  
Reply to this topicStart new topic
> Sending Mail To A Mailing List, Possibility of sending a newsletter
Vyoma
post Jan 3 2006, 04:58 AM
Post #1


Cosmic Overlord
Group Icon

Group: Members
Posts: 571
Joined: 26-November 05
From: Denver, Colorado, US
Member No.: 9,811
myCENTs:45.66



Task: To send an email to a list of email addresses stored in a database

Premise: Page is written in PHP, with the database as MySQL. The email addresses need to be taken from a column of a table in the database which is queried with some "WHERE" clause. The email sent to these addresses is static.

Objective: To send a newsletter to the members who have subscribed for the same on a website.

Well, there. I have put it as objectively and as clearly as possible. I have searched for the keywords "mail" and "PHP" on this section of the forum, and from what I have seen, it is possible to mail to an address. But is it possible to send it to a list of them? I mean, if I could get the addresses seperated by ';'. Or is there some other way? What I am trying to achieve is to send newsletters. For now, I would be satisfied with a static content. Later I would like to venture into the possibility of dynamic content. But may be for that, we need to handle each address one by one.
Go to the top of the page
 
+Quote Post
Houdini
post Jan 3 2006, 05:21 AM
Post #2


Super Member
Group Icon

Group: Members
Posts: 572
Joined: 25-April 05
From: Nashville Tennessee
Member No.: 4,340



Here are some links to some free scripts you night find of interest. On of these does not use a database but a textfile.

http://phpmailer.sourceforge.net/

http://www.davelozinski.com/scripts/mail_l...p?1136265340578

This is the one that uses a textfile instead of a database to possibly achieve what you want.

http://www.biegelscripts.com/index.php?a=6&t=2&l=0
Go to the top of the page
 
+Quote Post
Vyoma
post Jan 3 2006, 08:51 AM
Post #3


Cosmic Overlord
Group Icon

Group: Members
Posts: 571
Joined: 26-November 05
From: Denver, Colorado, US
Member No.: 9,811
myCENTs:45.66



Well, Houdini. The first link itself hit the jackpot - or so I think. I still will not be implementing it practically, I just wanted to get my design docs proper before going ahead for the implementation. So, I wanted to see, atleast in theory, if it were possible. I am a bit bad with the searches and could not get anything proper.

The second one is a mailing list one, which I quite extensive, and packaged. It would not be of much use to me. The third one was way overwhelming for me! tongue.gif

As I said, thanks!
Go to the top of the page
 
+Quote Post
Hercco
post Jan 5 2006, 02:33 PM
Post #4


Super Member
Group Icon

Group: Members
Posts: 595
Joined: 4-September 04
Member No.: 228



QUOTE(Vyoma @ Jan 3 2006, 06:58 AM)
  But is it possible to send it to a list of them?  I mean, if I could get the addresses seperated by ';'.  Or is there some other way?  What I am trying to achieve is to send newsletters.  For now, I would be satisfied with a static content.  Later I would like to venture into the possibility of dynamic content.  But may be for that, we need to handle each address one by one.
*



You just need to iterate, ie. loop through the list of addresses and call mail() for each.

And by this way making the email dynamic such as saying "Hey, [name]!" on the begining is really easy too. Just use a messafe templae of which you will process in the loop, replaceing the keywords such as [user] with the appropriate content from the database. Naturally there are many ways to do it, so use what you feel most comfortable with. Just adding text to beginng and end of the message is easiest route.

And since you're working with mail() don't forget to study documentation on how you should build the message headers. It's lot more "professional" to send automatically generated mail with proper headers. If I remember correctly, PHP documentation (or comments) has realyl nice info on headers, including examples.
Go to the top of the page
 
+Quote Post
Vyoma
post Jan 6 2006, 04:17 AM
Post #5


Cosmic Overlord
Group Icon

Group: Members
Posts: 571
Joined: 26-November 05
From: Denver, Colorado, US
Member No.: 9,811
myCENTs:45.66



Come to think of it, Hercco, I think I should go by your method. It is the most straight forward method, that right out missed my mind. Ha! This is fine example of how one gets lost in the complexity and fails to see all simple solutions.

Thanks Hercco.
Go to the top of the page
 
+Quote Post
Alexandre Cisnei...
post Jan 29 2006, 01:12 AM
Post #6


Newbie [ Level 2 ]
Group Icon

Group: Members
Posts: 24
Joined: 22-January 06
Member No.: 10,833



Hi! I found this Newsletter System, based on TXT files, not MySQL. It is VERRY simple. Here is the instructions:

----------------------------------------------
|### Newsletter System 1.0 L.E. ###|
----------------------------------------------
Leandro Maniezo
lemaniezo@ig.com.br

TRANSLATION FROM PORTUGUESE-BR TO ENGLISH:
Alexandre Cisneiros Filho
misteryoshi@gmail.com


Introduction
----------


- Put line-by-line the adresses on the file emails_bd.txt.

- Set the permitions of the txt files to be writebly.

- After sendin, all the adresses who recived the message are stored at log.txt.

- If some people dont recive the message, deleta all adresses on the file emails_bd that are in log.txt and send again.


Instaling
----------

- Put all the files in a folder on the site and set the permitions to the TXT files.

Obs.: NO Javascript allowed.
If you want to send images, you need to host them.


Just download the attached file!
Attached File(s)
Attached File  NewsletterSystem.zip ( 2.41k ) Number of downloads: 25
 
Go to the top of the page
 
+Quote Post
TavoxPeru
post Aug 24 2006, 10:17 PM
Post #7


Super Member
Group Icon

Group: [HOSTED]
Posts: 805
Joined: 8-April 06
From: Lima - Peru
Member No.: 12,579
myCENTs:46.87



QUOTE(Alexandre Cisneiros @ Jan 28 2006, 08:12 PM) *

Hi! I found this Newsletter System, based on TXT files, not MySQL. It is VERRY simple. Here is the instructions:

----------------------------------------------
|### Newsletter System 1.0 L.E. ###|
----------------------------------------------
Leandro Maniezo
lemaniezo@ig.com.br

TRANSLATION FROM PORTUGUESE-BR TO ENGLISH:
Alexandre Cisneiros Filho
misteryoshi@gmail.com
Introduction
----------
- Put line-by-line the adresses on the file emails_bd.txt.

- Set the permitions of the txt files to be writebly.

- After sendin, all the adresses who recived the message are stored at log.txt.

- If some people dont recive the message, deleta all adresses on the file emails_bd that are in log.txt and send again.
Instaling
----------

- Put all the files in a folder on the site and set the permitions to the TXT files.

Obs.: NO Javascript allowed.
If you want to send images, you need to host them.


Just download the attached file!

Thanks dude, a lot of time i waste searching something like this, is very simple, and also it demostrates me what i was doing bad in my script.

best regards,
Go to the top of the page
 
+Quote Post
NoMore
post Nov 11 2006, 08:51 AM
Post #8


Member [ Level 2 ]
Group Icon

Group: Members
Posts: 53
Joined: 11-November 06
Member No.: 17,170



i havnt readed what you all wrote but my way is to put the mails in an array and send it in a while of a simple mail function, that way ppl cant see who wlse the mail sent to
- you can create a log file to see how much it send and match it with mails so you can see how it works

NoMore
Go to the top of the page
 
+Quote Post
TavoxPeru
post Nov 12 2006, 08:56 AM
Post #9


Super Member
Group Icon

Group: [HOSTED]
Posts: 805
Joined: 8-April 06
From: Lima - Peru
Member No.: 12,579
myCENTs:46.87



QUOTE(NoMore @ Nov 11 2006, 03:51 AM) *

i havnt readed what you all wrote but my way is to put the mails in an array and send it in a while of a simple mail function, that way ppl cant see who wlse the mail sent to
- you can create a log file to see how much it send and match it with mails so you can see how it works

NoMore

Well, i use a database to store my mailing list and its about 3000 records right now, and to send it i do the same thing as you, but i noticed that this doesnt work because no mail is send and also i test it with a little list of 10 records, so i gonna try the use of an array instead maybe this way it works.

Best regards,
Go to the top of the page
 
+Quote Post
Aka_Bar
post Nov 12 2006, 05:38 PM
Post #10


Member - Active Contributor
Group Icon

Group: Members
Posts: 87
Joined: 4-November 06
Member No.: 16,990



some question to Administrators it is about Mailer i have PhpMailer and i dont know why, every time when im uploading it to hosting and using it for my needs, hosting prividers tellingmi to delete script and also ur account wll be deleted!!! can anyone answer me? why they doing so? im not spamer im just using it for like send News to members or for more ellection!
Go to the top of the page
 
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. List Of Free Applications(8)
  2. Using The Php Mail() Function For Images Or Attachments(6)
  3. Sending message through Lan(11)
  4. A List Abosulutely Free MMORPGs(6)
  5. In Php- How To Send Mail From Localhost To Web Mail Server(0)
  6. Gmail For Mail Server.(7)
  7. List Of Free Mmorpg..(24)
  8. Orkut.com Auto Scrapper - Scrap Ur Friend List In One Go(13)
  9. Preventing Spam When Using Php's Mail Function(6)
  10. List Of Funny Tech Signatures(7)
  11. How To: Display A Members/user List.(3)
  12. Php Send Mail Through Smtp(8)
  13. Outlook Express: Older Sent Mail Disappears(1)
  14. E-mail Marketing :: Some Fundamentals(5)
  15. List Of Free MMORPGs(18)
  1. Possibility Of A Google Os ?(90)
  2. Mud List(11)
  3. New Games.(0)
  4. List Of Free Mmos(1)
  5. E-mail - Firefox(6)
  6. Some Usefull Linux Basic Commands And Utilities. Please Add To This List If You Know One.(0)
  7. Mail Servers?(3)
  8. You can Play now in Linux(26)
  9. Sending E-mail Alert Through Sms(3)
  10. PHP Mail Sending Is Not Working After cPanel Upgradation!(22)
  11. Mail Is No Longer Working?(10)
  12. Comprehensive List Of Resources On Graphics/design(12)
  13. Htl Mail(0)
  14. My List Of Topics And Posts(5)
  15. Get A G-mail Account!(68)


 



- Lo-Fi Version Time is now: 5th December 2008 - 12:05 PM