• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

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

KeyserSoze

Diamond Member
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
 
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
 
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.

 
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)
 
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! 😎

Thanx again.





KeyserSoze
 
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! 😎

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
 
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! 😎

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

 
Back
Top