Topic awaiting preservation: Php Emailing from a Form (Page 1 of 1) |
|
---|---|
Bipolar (III) Inmate From: Australia |
posted 03-05-2003 14:11
Hiya all, i'm currently doing an email from forms using some asp and an inbuild jmail thing on my hosts, im wondering if anyone has some suggestions on howto send an email from a form using PHP, preferably a html formatted email also. Any ideas or pointers? Is it possible to do this at all without relying on your host? |
Maniac (V) Inmate From: Florida |
posted 03-05-2003 15:42
The mail() function allows you to send mail in PHP =) |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
posted 03-05-2003 15:45
but of course it relies on your host providing smtp and having in configured in php.ini... |
Maniac (V) Mad Scientist with Finglongers From: Cell 53, East Wing |
posted 03-05-2003 16:34
H][RO: I couldn't recommend this more highly: |
Bipolar (III) Inmate From: Australia |
posted 03-05-2003 22:42
Thanks all ill take a look at that link emperor, unfortunately my host doesnt give s smtp's ill see how i go |
Bipolar (III) Inmate From: |
posted 03-06-2003 23:28
<form action='?mode=mail' method='post'> |
Bipolar (III) Inmate From: |
posted 03-06-2003 23:31
1 |
Bipolar (III) Inmate From: Australia |
posted 03-07-2003 00:19
Thanks Az, its a windows server, and they have a smtp for me to use from the server which is good. |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 03-07-2003 00:40
No the php mail function is mostly an API configured with the php install to use the appropriate mailer utility |
Bipolar (III) Inmate From: Australia |
posted 03-07-2003 01:08
Bummer, well thanks for that, i guess i better give it a try and check with them. Does phpinfo() tell you if it has been setup and installed at all? |
Bipolar (III) Inmate From: Australia |
posted 03-07-2003 01:15
here is the php info for my host, i saw the sendmail_path = novalue =/ but further down it says sendmail support for windows enabled. |
Bipolar (III) Inmate From: |
posted 03-07-2003 05:28
Well, you can try the script I posted to see if it works...or just create a script like this: |
Bipolar (III) Inmate From: Australia |
posted 03-12-2003 13:29
Thanks Az, |
Bipolar (III) Inmate From: Australia |
posted 03-12-2003 23:55
on the same note, is there any way to get a response if the mail has been sent or not successfully? I'm not sure how this works, thanks again. |
Neurotic (0) Inmate Newly admitted From: |
posted 03-13-2003 03:10
goto http://php.net |
Bipolar (III) Inmate From: Australia |
posted 03-14-2003 00:12
Yeh ive done this, i dont quite see anything about returning wether it was successful or not |
Bipolar (III) Inmate From: Berlin (almost) |
posted 03-14-2003 15:57
The mail() function retruns "true" if the mail could be sent and "false" if there was a problem, so you can use something along these lines: code: if (mail($recipient_email, $subject, $message, "From: $name <$email>")) {
|
Bipolar (III) Inmate From: Australia |
posted 03-15-2003 02:22
Thanks Kuckus, i have never really taken much advantage of funciton returns, a bad thing on my part, appreciate it. |