?
Solved

php mail function with bcc,cc and reply-to

Posted on 2003-11-01
4
Medium Priority
?
839 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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
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

801 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