PDA

View Full Version : Send copy of all emails to admin


Thomas P
01-09-2004, 09:20 PM
Hello folks,

I need all emails sent via the forum eMail form cc'ed to the admin.

I'll post a note on the eMail form about this procedure.

We have way to many spammers abusing this form.

Anyone?

Thanks,
-Tom

Thomas P
01-09-2004, 10:02 PM
Hello folks,

I need all emails sent via the forum eMail form cc'ed to the admin.

I'll post a note on the eMail form about this procedure.

We have way to many spammers abusing this form.

Anyone?

Thanks,
-Tom
At the end of member.php I found this


(...)
eval("\$sendmessage = \"".gettemplate("email_usermessage",1,0)."\";");

$subject = preg_replace('/[\n\t\r,]/s', ' ', $subject);

vbmail($destuserinfo['email'], $subject, $sendmessage, $bbuserinfo['email'], '', $bbuserinfo['username']);

// parse this next line with eval:
$sendtoname=$destuserinfo[username];
eval("standardredirect(\"".gettemplate("redirect_sentemail")."\",\"$HTTP_POST_VARS[url]\");");
}

?>


Can I just add an address?

NTLDR
01-09-2004, 10:07 PM
If you only want to have them for emails sent via the email user form then add after:

vbmail($destuserinfo['email'], $subject, $sendmessage, $bbuserinfo['email'], '', $bbuserinfo['username']);

this:

vbmail('admin@email.com', $subject, $sendmessage, $bbuserinfo['email'], '', $bbuserinfo['username']);

replacing admin@email.com with the admins email address.

Totaly untested as I don't use vB2, but should work based on the code you posted :)

Thomas P
01-09-2004, 10:11 PM
Thanks,
so the mails are now sent to the dest. user plus the admin?

NTLDR
01-09-2004, 10:13 PM
Yes they should get sent to the user, then the exact same email sent to the address you entered :)

Thomas P
01-09-2004, 10:14 PM
Yes they should get sent to the user, then the exact same email sent to the address you entered :)
Ah, I see, I now have two nearly identical lines - thanks, I'll try this.

Thomas P
01-09-2004, 10:19 PM
Works perfect, simple and good!

Many thanks NTLDR!!

Now I have to check with my mods, if they ok this :)

NTLDR
01-09-2004, 10:22 PM
No problem, glad I could help you out :)

we_scooter
01-26-2004, 07:28 PM
No problem, glad I could help you out :)
guys which version is this

I didnt find it in 227

Xenon
01-26-2004, 07:35 PM
227 doesn't use vbmail() iirc.

you should really upgrade to 234 regarding the security holes in 227

we_scooter
01-26-2004, 07:46 PM
actually

tehre is a pro designer taking care of that and i will be on 234 soon ;)

thanx Xenon I like ur name master.. so something..

we_scooter