Need a good way for the user to select "To" to send email

I have a website where a user can send emails. I have a view of facial expressions of a basic form with:

To: <Text Input> Subject:<Text Input> Attachments: <Button> <Text Input> Body <input text> 

I have a list of email addresses in the database table and it is easy for me to get this. I am trying to find the easiest way to support the following use cases:

  • Allow users to send letters to everyone on the list.
  • Allow users to select specific group members

What would be a good way to do this? Are there some code samples?

One of the ways I thought is to imitate Gmail, when you can just start typing and it will do an integrated search for emails in the list. I assume that in this case I will have a separate "Select All" button.

This is just one idea. I am open to suggestions.

+3
html email
source share
3 answers

The jQuery plugin that I referenced in the answer below has been replaced with the jQuery UI component .


I would definitely recommend an autocomplete approach. Something like this jQuery plugin would be a good start. You will need to change the code for processing commas as a trigger for a new autocomplete search.

As with all members, yup, the "All Members" checkbox seems the easiest. If you want, you can also include keyword triggers in your processing in the To field, so that words like "All" or "All" are equivalent to selecting a check box.

Edit: jQuery is one step ahead of me, and the autocomplete plugin already supports multiple entries :

 $("#suggest3").autocomplete(cities, { multiple: true, mustMatch: true, autoFill: true }); 
+2
source share

Like a "simple pick list." All Group 1 Group2 Group3 ...

If a group is selected, upload multiple items with multiple group members.

+1
source share

I would make the "send to all" only checkbox, and the server defines this list (therefore, it is not displayed on the client side).

With specific users, I allow the person who selects the identifier from the list (not the actual email addresses). If this is not a mail client, you probably should not publicly publish these peopleโ€™s emails. How you imagine it, it depends on the number of people in your database, etc. But autocompletion can be a nice or simple tree-based choice. (Listing groups> people).

+1
source share

All Articles