Log in

View Full Version : Contact us e mail problem


mlomenzo
09-24-2007, 02:25 PM
Hello all. Ok so here is my problem. I have unregistered user able to contact me via the contact us link at the bottom of the page. The user has to verify the image and so on. This is all great and allows my email address to be hidden to the outside world. My problem is this. When I get an E mail message from an unregistered user I get it with the following information:

Referring Page:
IP Address:
User Name: Unregistered
User ID: 0

Now whats the one thing missing from this info that I really need to help the user? There E mail address. I can not find anywhere how to fix this problem. The user has to enter there e mail address in order to send the form so why do I not get it? :confused:I have looked in the sendmessage.php file, in the contact us template and so on. I am sure that I am missing something and I will feel like an idiot when someone points it out to me. BUT PLEASE HELP THE IDIOT!!!. Thanks
Mike

Lynne
09-24-2007, 03:15 PM
When you receive this email, can't you just look at the headers and see who it's from? The email address the user entered should be the "from" line in your email. All you should have to do to reply to them is hit reply and your email client should put this "from" email addy into the "to" field.

mlomenzo
09-24-2007, 03:30 PM
In the from line it says my message board name and the E amil address of my pop server account that i authorized to send mail from my mesasge board. doing this prevents spammers from spamming from my board. so I have to keep the from field in the header as is. I need to add the e mail field somewhere else in the message.

Lynne
09-24-2007, 04:54 PM
I'm not using vb 3.6 but I think what you want to do is use the hook 'sendmessage_docontactus_start' (I think you could actually use that hook or 'sendmessage_docontactus_process') and add the line: "$email =& $vbulletin->GPC['email'];" That will make the variable $email available to your phrases.

Then find the phrase in "Email Body Text" called "contactus" and add in a line for the email like:
The following message was sent to you via the $vboptions[bbtitle] Contact Us form by $name. -------------------------------- $message -------------------------------- Referring Page: $url IP Address: $ip User Name: $bbuserinfo[username] User Email: $email

I am NOT SURE about this at all. I haven't tested it. I'm a coder who tries one thing and if it doesn't work, I try something else. But, this is how I would have gone about it.

mlomenzo
09-24-2007, 05:30 PM
That looks great, I will try it now. I'll get back to you and let you klnow. thanks.
Mike

That is in the sendmessage.php file correct? I just want to make sure before i change anything.
Thanks again
Mike

Thank you so much lynne. That worked perfectly. That is the fix that I was looking for. You are brilliant.

Lynne
09-24-2007, 07:34 PM
I'm glad to hear it worked for you!