View Full Version : Contact Us form sends email so Reply e-mail address is the server e-mail
postcd
08-03-2016, 08:43 AM
Hello,
please what to do so when i receive e-mail from vBulletin (4.2.x) Contact Us page i click to Reply that e-mail and the recipient is user@myserver.hostname.here
I would like it to be e-mail of the person who contact me.
Thank You for help
Gio~Logist
08-03-2016, 12:09 PM
It could be that person actually entered that and wasn't a user at all.
kerrghann
08-03-2016, 04:33 PM
I'm not positive how you have your form set up to email, but I use this for mine and when I click 'reply' it replies it to the email provided. Feel free to take, modify, and implement as you feel the need:
<?php
$ini = parse_ini_file("includes/config.ini.php");
$to = $ini['adminEmail'];
$subject = $ini['emailSubject'];
$headers = array();
$headers[] = "MIME-Version: 1.0";
$headers[] = "Content-type: text/plain; charset=iso-8859-1";
$headers[] = "From: Transcendence <" . $ini['adminEmail'] . ">";
$headers[] = "Reply-To: " . $_POST["username"] . " <" . $_POST["email"] . ">";
$headers[] = "Subject: {$subject}";
$headers[] = "X-Mailer: PHP/" . phpversion();
$message = "Greetings <B>" . $ini['administrator'] . "</B>,\r\n\r\nA user has requested access to the Administrative Control panel via the Transcendence page.\r\n\r\nThe Users Info is as Follows:\r\n\r\n<B>Username</B>: <I>" . $_POST["username"] . "</I>\r\n" . "<B>Email</b>: <I>" . $_POST["email"] . "</I>\r\n" . "<B>IP Address</B>: <I>" . $_SERVER['REMOTE_ADDR'] . "</I>\r\n" . "<B>Hashed Password</B>: <I>" . $theHash . "</I>\r\n\r\nConfirm with the User that they have requested this access. If they have, please go to the .htpasswd file and uncomment their hashed password to give them access. Thank you!\r\n\r\n\r\nTranscendence\r\n" . $ini['siteName'] . " at It's Finest";
$message = wordwrap($message, 70, "\r\n");
mail($to, $subject, $message, implode("\r\n", $headers));
?>
Gio~Logist
08-03-2016, 04:40 PM
That doesn't appear to be a part of vB o_0
I'm assuming the contact us page he was talking about is sendmessage.php
kerrghann
08-03-2016, 04:42 PM
That doesn't appear to be a part of vB o_0
I'm assuming the contact us page he was talking about is sendmessage.php
I assumed he was talking about his website that is linked in his signature. If you click it and go to his contact page, it shows a form that appears to be custom coded using vBulletin's api.
Although I could easily be completely mistaken. It's what I went off of though, haha.
*EDIT* Also, to note, my Contact Us page has been broken for awhile. Even when it did work it wasn't the most glorious thing in the entire world either. I much prefer a nice custom coded PHP mailer. But that's besides the point. If I was incorrect in assuming that your linked website was the contact for in question, I apologize, postcd.
postcd
09-07-2016, 07:26 AM
I'm assuming the contact us page he was talking about is sendmessage.php
Yes, correct. Interesting is that when i use vB 4.1.10 Contact Us, reply email is correct, but in 4.2.0, non existing hostname kind of e-mail is used when i reply, not e-mail of the contact us form sender.
Both vbulletins hosted on same server, both on cPanel accounts. E-mail configuration pages in both vBulletins seems same.
Can you please suggest me what to check? Which file is responsible for the PHP code that is used to send e-mail? SO i may try to use old vbuleltin one in newvbuleltin, or what to do?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.