Need PHP Script: Send mail within a web page to selected users

KeyserSoze

Diamond Member
Oct 11, 2000
6,048
1
81
Exactly as the title says, I need a script that will allow me to send email to a specified users account. Obviously, I don't want their email address listed, but I need like a form that has the option of choosing person 1, person 2, and/or the webmaster. And I'd have the form where they could type in whatever they want.

I'm checking all the sites, and google. Hotscripts might have it, I'm checking, but have been unable to find one that does it.

It's been a LONG time since I've done PHP. If I can find my book, it should have it listed in there.

Any links to a script that does this would be GREATLY appreciated. Thanks.





KeyserSoze
 

Ioo

Member
May 13, 2004
107
0
0
I could tell you how in ASP/ASP.NET, its really simple, but ive never done much with Php.
 

KeyserSoze

Diamond Member
Oct 11, 2000
6,048
1
81
Originally posted by: Ioo
I could tell you how in ASP/ASP.NET, its really simple, but ive never done much with Php.


It really can't be that hard. I'm looking through this book, I've got my form created. I'm starting off with how to just initiate the email to set email addresses already specified. Once I do that, it's just a matter of taking what was typed in, and storing that into a variable.

Ugh. Google is failing me. The problem is, there is TOO much information about something like this.





KeyserSoze
 

Beau

Lifer
Jun 25, 2001
17,730
0
76
www.beauscott.com
You'll want to read up on the PHP mail() function

Where will you be pulling this user list from?

I've got a function that will send a message to each of the values in an array, either plain-text or HTML formatted based on a template HTML document. The array needs to contain the email address, name of recipient and a boolean of whether or not to send the message HTML formatted or not.

 

AFB

Lifer
Jan 10, 2004
10,718
3
0
Actually, some questions:

a) Is this a hardcoded list or from a DB?
b) Will the page that sends the email be the same page where the user rights it or will this just be a page that you POST to and it redirects you when you're done?
c) If the second, how did you figure out the list of names so you can do the same on the email page



What you DO NOT want to do is just POST the email address that the user selected from the list because then it can be used as a spam relay without much work.


Doesn't seem like to much work to do. If you need help, I wouldn't mind if you IM'd me at all. (iconcatenate on AIM)
 

KeyserSoze

Diamond Member
Oct 11, 2000
6,048
1
81
Originally posted by: Beau

k, here's a quick and dirty example. It may not be exactly what you were looking for, but you'll get the idea. :)

Source Code
Working Page


That was EXACTLY what I'm looking for. Thank you SOOO much. You rock. Thanx!

Funk this, I'm learning PHP after this crap is done! :cool:

Thanx again.





KeyserSoze
 

AFB

Lifer
Jan 10, 2004
10,718
3
0
Originally posted by: KeyserSoze
Originally posted by: Beau

k, here's a quick and dirty example. It may not be exactly what you were looking for, but you'll get the idea. :)

Source Code
Working Page


That was EXACTLY what I'm looking for. Thank you SOOO much. You rock. Thanx!

Funk this, I'm learning PHP after this crap is done! :cool:

Thanx again.





KeyserSoze

Glad you got it to work. If you take the time to use it alot here, you WILL know it by the time you're done
 

KeyserSoze

Diamond Member
Oct 11, 2000
6,048
1
81
Originally posted by: amdfanboy
Originally posted by: KeyserSoze
Originally posted by: Beau

k, here's a quick and dirty example. It may not be exactly what you were looking for, but you'll get the idea. :)

Source Code
Working Page


That was EXACTLY what I'm looking for. Thank you SOOO much. You rock. Thanx!

Funk this, I'm learning PHP after this crap is done! :cool:

Thanx again.


KeyserSoze

Glad you got it to work. If you take the time to use it alot here, you WILL know it by the time you're done

I really want to learn it, I just need a good book about it. The web has more than enough tutorials, but I can't sit there and read it all on a screen, and write it up.

One of these days.





KeyserSoze