if I can find - say ... somewhere I saw
Hi guys,
I have a PHP form and when a user submits the form it sends the data to my email address and also sends a confirmation email to the user but the problem i have is the confirmation email to the user shows its from my email address. How can i change it so it says "noreply" or "automated response email"?
Heres the code that it think is causing the problem
/* MAIL TO USER */
$from = "$admin_email<$admin_email>";
$headers = "Return-Path: <$admin_email>\n";
$headers .= "X-Sender: <$admin_email>\n";
$headers .= "From: $from\n" .
$headers .= "X-Mailer:PHP\n";
$headers .= "X-auth-smtp-user: $admin_email\n";
$headers .= "MIME-Version: 1.0\n";
$headers.="Content-Transfer-Encoding: 8bit\n";
$headers .="Content-Type: text/html; charset=UTF-8\n";
if I can find - say ... somewhere I saw
You would just need to set the $admin_email variable to: noreply@yourdomain.com
Or just capture the details the user entered on the contact form into a database. No need for email then.
forget about the above
just change this:
$from = "$admin_email<$admin_email>";
$headers .= "From: No-Reply@yourwebsitename\n" .
$headers .= "MIME-Version: 1.0\n";
$headers.="Content-Transfer-Encoding: 8bit\n";
$headers .="Content-Type: text/html; charset=UTF-8\n";
and here you go, emails will be sent to your address ($admin_email, but nothing will show on the recipient.
You've just added to many optional info in your header, your email shouldn't show in the email header to your visitor.
for more help you can contact support@websiteandcomputer com
if you need more php help... ask professionals...
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks