How do I send an email with the PHP function mail so that when someone receives the mail it says the email is from instead of ?
$mailto = 'you@yourdomain.co.uk'; $mailsubject = 'Subject - Enquiry'; $mailheaders .= "From: $NAMEFROMFORM <$EMAIL>\r\n"; $mailheaders .= "Reply-To: $EMAILFROMFORM\r\n"; $mailheaders .= "Return-Path: $EMAILFROMFROM\n"; mail($mailto,$mailsubject,$mailtext,$mailheaders);
OK, rather than start another thread on PHP mail forms, can I start part B of this one...? ( Sorry for the "threadjack" Weirfire ) I've got a client who is going to be using multiple forms on one page (up to about 4x of them) and numerous repeat forms throughout their site. I'm a newb to PHP so I searched for numerous PHP form methods - some were hugely complex, so I ended up finding a simple form. I been tryiong to get the damn thing to work for hours now, but to no avail Anyone know of a good, simple PHP form method that I can use, bearing in mind that I know so very little PHP...? Very many kind thanks in advance
No probs about the hijack. What exactly is it you want to do? Are you wanting to create a function that you can just call over and over again? If you post some code that you have already I'll see what I can do
Yo, Weirfire The code I used was from http://www.noviceform.com/ - I modified it with all the approriate paths etc in *all* the files. I went through it thoroughly again and again. When I tested the form I never received the mail. I went back through the code and files, tried it again. No mail. And so on.... *headscratch* Either there's an issue with my hosting and the client's hosting or with the code ??
Can't help you if: 1. you don't explain what you are requesting for in more detail 2. you don't post excerpts of the code you are working on noviceform dot com requires you to register - not many people will be willing to do that
Thanks daboss, I know what you mean. All I wanted was a very simple mail form that I could then use, and then modify. I have just found another one, tested it and it works straight away. The code looks similar to the ASP mailforms I've used in the past and looks like it will adapt to my needs. Thankyou
No probs Lever. Just give me a shout if you need any more help with PHP especially databases I'm still learning a lot of PHP stuff but I might still be able to help you out
Thanks Weirfire, I really appreciate that Once the dust settles after this project (8 months by time of expected launch) I'll be ready to do some other jobs (a database project included) and may just give you a shout to see what you can do. Thanks again