
I'm nearly there, now i changed the mailaddress to send to in that file but the mail is being sent 3 times (because there are 3 admins), do you know how to avoid this? I only needs it to be send out once

Grtz,
Nic
It is a little bit tricky.DubCA wrote:Might be a dumb question, but how do I enable the contact form? I can't figure it out.
You are welcome. I have only one admin on my board, so I do not have that issue. But I think this might work:saaiberke wrote:Thank you very much Ashok.That worked great!
I'm nearly there, now i changed the mailaddress to send to in that file but the mail is being sent 3 times (because there are 3 admins), do you know how to avoid this? I only needs it to be send out once![]()
Code: Select all
// Loop through our list of users
for ($i = 0, $size = sizeof($contact_users); $i < $size; $i++)
Code: Select all
// Loop through our list of users
for ($i = 0, $size = sizeof($contact_users); $i < 1; $i++)
Thank you!Ashok wrote:It is a little bit tricky.DubCA wrote:Might be a dumb question, but how do I enable the contact form? I can't figure it out.That should work.
- Go to the ACP and click the System tab.
- Then, on the left, locate MODULE MANAGEMENT and click Administration Control Panel.
- Look for "Add Module" button on the right. You will also see a drop-down list to the left of the Add Module button. From the drop-down list, look for "Board Management [acp_board]" and within this heading, "Contact board administration". Choose it, and click "Add Module".
- This action will cause "Contact board administration" to appear in the list of modules. It will be shown with a lock, meaning disabled. Click the "Enable" link to enable the module.
- You should now see a separate tab at the top level for "CONTACT BOARD ADMINISTRATION". If not refresh your page.
- Go into that tab, and make the settings you need.
As I changed the to: address this is no problemAshok wrote:
Of course, this means it will send the email to the first admin it finds in the list of admins.
Code: Select all
$messenger->to($contact_users[$i]['user_email'], $contact_users[$i]['username']);
Code: Select all
$messenger->to("youremailaddress@here");
The text is there twice - do I need to replace it both places?Ashok wrote:You are welcome. I have only one admin on my board, so I do not have that issue. But I think this might work:saaiberke wrote:Thank you very much Ashok.That worked great!
I'm nearly there, now i changed the mailaddress to send to in that file but the mail is being sent 3 times (because there are 3 admins), do you know how to avoid this? I only needs it to be send out once![]()
Look for:
Replace with:Code: Select all
// Loop through our list of users for ($i = 0, $size = sizeof($contact_users); $i < $size; $i++)
Of course, this means it will send the email to the first admin it finds in the list of admins.Code: Select all
// Loop through our list of users for ($i = 0, $size = sizeof($contact_users); $i < 1; $i++)
Code: Select all
case CONTACT_METHOD_EMAIL:
Hello Ashok,Ashok wrote:
Add the following on a new line after the last of the above lines:
This will set both the FROM and REPLYTO email address to be the email address of the person trying to contact you via the form. If a registered user, their email address from their profile will be used. If it is a guest, then, it will be whatever email address they entered on the contact form.Code: Select all
$messenger->from($contact_email); $messenger->replyto($contact_email);
Hope this is what you are looking for.
Code: Select all
$messenger->from($contact_name);
No problem AshokAshok wrote:Nic:
I am sorry, I do not know how to do that. Beyond my meagre php knowledge. But if it is any help, the real name of the person using the form is included in the body of the message. I guess you already knew that.
Regards,
Ashok