Recent Topics

1 Jan 19, 2009 21:56    

My b2evolution Version: Not Entered

Hi there,

I was wondering, is there a way to add recipients to the mail message? I'd like my contact form to send to my admin address plus another.

Any pointers, as always, are much appreciated.

GSO

2 Jan 20, 2009 01:34

Yup.

In v246 look in htsrv folder for message_send.php file and find this bit:

// Send mail
$success_mail = send_mail( $recipient_address, $subject, $message, "$sender_name <$sender_address>" );


// Plugins should cleanup their temporary data here:

Now hack it.

// Send mail
$success_mail = send_mail( $recipient_address, $subject, $message, "$sender_name <$sender_address>" );

if( $recipient_id == '1' ) { // '1' being the admin yah?
$another_recipient_address = someone_else@whatever.tld; // the other person's email addy of course
$super_success_mail = send_mail( $another_recipient_address, $subject, $message, "$sender_name <$sender_address>" );

// Plugins should cleanup their temporary data here:

Untested, so if it fails blame the core ;)

3 Jan 20, 2009 19:14

Thanks mate but:

Parse error: syntax error, unexpected '@' in /home/gsingh/public_html/blog/htsrv/message_send.php on line 290

line 290 being:
$another_recipient_address = someone_else@whatever.tld; // the other person's email addy of course

4 Jan 20, 2009 19:17

$another_recipient_address = 'someone_else@whatever.tld'; // the other person's email addy of course

;)

¥

5 Jan 20, 2009 20:21

Thanks BB but:
Parse error: syntax error, unexpected $end in /home/gsingh/public_html/blog/htsrv/message_send.php on line 320

Line 320 being:

?>

Note, I tried both single inverted commas and double '/" and same thing

:-/

6 Jan 20, 2009 20:39

}
// Plugins should cleanup their temporary data here: 

¥

7 Jan 21, 2009 03:35

Thanks ¥åßßå!

As soon as I saw your reply I realized my error ... AND saw the second one coming. I should leave free-typing hacks to someone who can handle it eh?

8 Jan 26, 2009 23:33

Sorry for taking sooo long to reply - the solution worked an absolute charm!

Thank you both for your input!


Form is loading...