Solved

php mail function with bcc,cc and reply-to

Posted on 2003-11-01
4
837 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 50 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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

688 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