Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
add additional email address
Old 12-17-2008, 10:01 AM add additional email address
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 961
Name: Darren
Location: England
Trades: 0
Hello again...

I am trying to modify a script that generates a confirmation once and order has been placed -

PHP Code:
// set up mail details
$mail_to "info@test.com";//primary email address
$mail_from stripslashes($_POST['Customer_Email']);
$mail_subject "Order Confirmation";
$mail_headers "FROM: $mail_from\r\n";
//added additional recipient 
I need to get this to CC to another address but whatever i adjust it dosn't send the CC'd email.

I can see that added additional recipient is commented at the bottom but can I just add another $mail_to before that??
__________________
I Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."
rolda hayes is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-17-2008, 10:05 AM Re: add additional email address
Insensus's Avatar
Ultra Talker

Posts: 487
Name: Mark Stegeman
Location: Netherlands, Europe
Trades: 0
You can add a CC with the additional headers:
PHP Code:
$mail_headers .= "CC: $cc\r\n"
http://nl2.php.net/manual/en/function.mail.php
__________________
<?php ($helpfull>0)?$talkupation++ : '';?>
Insensus is offline
Reply With Quote
View Public Profile
 
Old 12-17-2008, 11:14 AM Re: add additional email address
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 961
Name: Darren
Location: England
Trades: 0
Thanks Mark, all working now - I did look at the link you sent before I posted but your line made more sense!

Cheers
__________________
I Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."
rolda hayes is offline
Reply With Quote
View Public Profile
 
Old 12-17-2008, 11:54 AM Re: add additional email address
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 961
Name: Darren
Location: England
Trades: 0
Actually, there still seems to be a problem with it...

It is sending the order to the correct address and to the backup email address but it isn't now sending to the 'Customer_Email' address...?

PHP Code:
// set up mail details
$mail_to "info@*******.co.uk";//Primary email address
$mail_from stripslashes($_POST['Customer_Email']);
$mail_subject "Order Confirmation";
$mail_headers "FROM: $mail_from\r\n";
$mail_headers .= 'Cc: orderconf@*********'"\r\n";
//added additional recipient
$mail_body $strBody
__________________
I Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."
rolda hayes is offline
Reply With Quote
View Public Profile
 
Old 12-17-2008, 12:17 PM Re: add additional email address
Insensus's Avatar
Ultra Talker

Posts: 487
Name: Mark Stegeman
Location: Netherlands, Europe
Trades: 0
I think you need to switch the $mail_to and $mail_from because you're now sending it from the customer to yourself? :S
__________________
<?php ($helpfull>0)?$talkupation++ : '';?>
Insensus is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to add additional email address
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.27059 seconds with 12 queries