General Community > Scripting Help

Sending E-mails?

(1/1)

Killer Possum:
I'm currently learning PHP and I can make a form that will send inputed information to another webpage but I want to know how to make it send the inputed info to an e-mail address (like a survey or something), can anyone help me?

Killer Possum:
Oh and I would like it to use my mailserver not open a mail program, TIA :D

Haase:
The easiest way to do this is using the mail() function incorporated into PHP.  The basic syntax is mail($to, $subject, $body), but there are also a lot of additional options that you can send such as headers.  You can RTFM here for more information, or if you really want to go wild with it, you can check out my multipart/alternative email mod for YaBB SE/PfaBB.  That mod sends mail in both plain text and HTML in a format that allows the end user's mail client to determine whether to show text or HTML (depending on how the user has that client configured).

Killer Possum:
Thank you so much for that information Haase, I will look into this more :D

Navigation

[0] Message Index

Go to full version