Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

internal email system

Participant ,
Oct 26, 2009 Oct 26, 2009

I want to create a internal email system that is able to send email everyone that has signed up with an email address, but also I want to be able to choose certain people from the list also.

Will a database be needed to hold the message details?

Or can the user just write an email and then send it to everyone?

TOPICS
Server side applications
619
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 26, 2009 Oct 26, 2009

You should not need to store the email contents in a database. Just store the email addresses and populate those into the email object.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 27, 2009 Oct 27, 2009

ok, but how do I select more than one email address to be put into the email form?

I've got an option to send to ALL or individual

I have realised I am stuck.

I have created a database to hold the mails.

CREATE TABLE `messages` (
  `mess_id` int(10) NOT NULL auto_increment,
  `mess_title` varchar(50) NOT NULL,
  `mess_category` varchar(20) default NULL,
  `mess_text` longtext NOT NULL,
  `mess_send_to` varchar(50) NOT NULL,
  `mess_status` varchar(3) NOT NULL default 'On',
  `mess_date` date NOT NULL,
  PRIMARY KEY  (`mess_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

I wanted to display the message on the clients login area, hence using the database.

I have now decided to use the client name/ ID to send messages to the correct user

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 27, 2009 Oct 27, 2009
LATEST

>ok, but how do I select more than one email address to be put into the email form?

>I've got an option to send to ALL or individual

First you'll need a way to display the list of individuals. Depending on how many there are, you could use a multiple selection listbox, or display them on a page with a check box for each. Also include a "Select All" checkbox.

Evaluate the form, and if the "Select All" checkbox is checked, then simply loop through all of the values and append them to a comma seperated string. If "Select All' is not checked, then loop through the selected records. Be aware that many hosts limit the number of emails you can send at a time, so if the list is long you may need to break it into smaller chunks.

>I wanted to display the message on the clients login area, hence using the database.

If you want to display the message as well as email it, then yes, use a database. Sorry if I didn't understand your original message.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines