permission based email system

the mail() function

Moderators: macek, egami, gesf

Alicia
New php-forum User
New php-forum User
Posts: 94
Joined: Sun Sep 21, 2003 5:30 pm

permission based email system

Postby Alicia » Mon Aug 16, 2004 2:39 am

Hi guys,

i am wondering is it possible to use php to develop a permission based email system ?? i was told this kind of online system only can be done by using java with js..

can somebody give me an idea where i can get some reference how php can send bulk htm email like a permission based email ?? tracking the activities might not be so important in my case.. i just want my clients get our newsletter every month.

i have tried to use while loop to send out an email to all people from my database but the output is totally different from how it suppose to look like. .. the layout structure become different and the color that suppose to be one color turn to another.. this kinda weird for me coz i do follow and use all the headers that i was asked to use.. but it was not working

i have about 300 people from my mailing list and i wish to send them newsletter without paying for this service.. i really hope you guys could assist me on this.. please advise how can i send html emails to multiple people correctly.

thanks

User avatar
ruturajv
php-forum Super User
php-forum Super User
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India
Contact:

Postby ruturajv » Mon Aug 16, 2004 7:22 pm

300 is not a big list...
You can send it through a nice for loop... ;)
As for the mailing goes.. use phpmailer... A very very good emailing class.
http://phpmailer.sourceforge.net
And for the permissions...
you'll need a table where you save the newsletter ids mapped with the user ids
so..

Code: Select all

user table
  userid
  username

newsletter table
  nlid
  newslettername
  ...

newsletter_user
  nlu_id
  userid
  newsletter_id


User avatar
gesf
Moderator
Moderator
Posts: 1717
Joined: Sun Dec 29, 2002 5:03 am
Location: Portugal / Sweden
Contact:

Postby gesf » Tue Aug 17, 2004 4:35 am

I´m not sure about using a loop for that. Anyway, a good idea could be using mail's Bcc (Blind Carbon Copy), but... i´m not sure about the limit (for email addresses) of this one.

About sending emails periodically.
Alicia, you can run your script using a cronjob set to your preferred date and time. And the permissions just like ruturajv said.

User avatar
swirlee
Moderator
Moderator
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back
Contact:

Postby swirlee » Tue Aug 17, 2004 5:39 am

Really PHP should not be used for sending mass e-mails. There is software designed specifically for this purpose, such as majordomo, that you could call from PHP.


Return to “PHP coding => Mail”

Who is online

Users browsing this forum: No registered users and 1 guest