Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

php mail function with bcc,cc and reply-to

Posted on 2003-11-01
4
Medium Priority
?
842 Views
Last Modified: 2013-12-12
can somebody please help me with the php code for sending emails.

the code must include the from,reply-to,cc,bcc and the message.

please i need it urgently.
0
Comment
Question by:josiah007ng
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 3

Expert Comment

by:red010knight
ID: 9664695
First off how is the data getting to php? using Post, Get or command line/auto script -- although it doesn't really matter, it does affect the setup code that must be placed before the actual calls.

Second what platform are you using?

http://us2.php.net/manual/en/function.mb-send-mail.php

The above link should be able to get you started. Unfortunately cc and bcc does not seem to be supported to the best of my ability to test. Though it might be in 5, but it doesn't say whether it does or not.

Hope this helps,
Happy coding,
Red010Knight
0
 
LVL 13

Accepted Solution

by:
lozloz earned 200 total points
ID: 9664908
if you're using the function mail(), you need to attach these parameters in the headers

<?
$headers = "From: me@address.com\r\n";
if($cc) { $headers .= "Cc: $cc\r\n"; }
if($bcc) { $headers .= "Bcc: $bcc\r\n"; }
if($reply) { $headers .= "Reply-To: $reply\r\n"; }
# e.g. mail("someone@domain.com", "Greetings", "This is a message", $headers);
?>
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question