Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 846
  • Last Modified:

php mail function with bcc,cc and reply-to

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
josiah007ng
Asked:
josiah007ng
1 Solution
 
red010knightCommented:
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
 
lozlozCommented:
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

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now