cattledogz Posted March 24, 2006 Share Posted March 24, 2006 Ok.. I have my html form and it does email everything.. my new problem is that I also have the form set up to email the person submitting it.. When it emails the person, despite me having my code like this: [code]$EmailFrom = 'RFID Solutions {jennie@xxx.ca}';mail("$EMailAddress","RFID - Thank you for taking our Survey", $info, $surinfo,$EmailFrom);[/code]the {} around the email addy are really <> only because it dissappeared in my code here.It emails the "thanks for taking our survey" to the submitter, but it comes from the server (apache@myhost.com)...rather than the email address I defined in my code....What on earth am I not doing??? I've tried several different things to no avail...jen Quote Link to comment Share on other sites More sharing options...
mlin Posted March 24, 2006 Share Posted March 24, 2006 Insert the from address directly into the headers[code]$headers = "From: You <you@yourdomain.com>\r\n";$headers .= //any additional headers$subject = 'email subject';$message = 'email message';mail($to_email_address, $subject, $message, $headers);[/code]I don't like mailing items right away when the user submits data, but rather insert it into a temp db table, and use cron to call a separate script every min checking for new messages.Takes the performance issues of mail() away from the user at least. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.