mattsmith Posted May 1, 2017 Report Share Posted May 1, 2017 Is there a way of changing the email that the contact form sends to? I want all contact emails to go to my CEO Quote Link to comment Share on other sites More sharing options...
Members Vangelis Posted May 1, 2017 Members Report Share Posted May 1, 2017 do you use a custom form ? if yes can you porst the code ? Quote Link to comment Share on other sites More sharing options...
mattsmith Posted May 1, 2017 Author Report Share Posted May 1, 2017 I use the custom phpvms contact form. Quote Link to comment Share on other sites More sharing options...
web541 Posted May 1, 2017 Report Share Posted May 1, 2017 As stated above, can you please post the code for your custom form. If you are using the default contact page, then check here https://github.com/DavidJClark/phpvms_5.5.x/blob/master/core/modules/Contact/Contact.php#L76 and change ADMIN_EMAIL to "ceo@url.com" This is not what you are after, but in case you were wondering. https://forum.phpvms.net/topic/1317-request-contact-form-mod/?do=findComment&comment=8116 Quote Link to comment Share on other sites More sharing options...
mattsmith Posted May 2, 2017 Author Report Share Posted May 2, 2017 <?php if(!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die(); } ?> <h3>Contact Us</h3> <form method="post" action="<?php echo url('/contact'); ?>"> <table width='100%' border='0'> <tr> <td><strong>Name:</strong></td> <td> <?php if(Auth::LoggedIn()) { echo Auth::$userinfo->firstname .' '.Auth::$userinfo->lastname; echo '<input type="hidden" name="name" value="'.Auth::$userinfo->firstname .' '.Auth::$userinfo->lastname.'" />'; } else { ?> <input type="text" name="name" value="" /> <?php } ?> </td> </tr> <tr> <td width="1%" nowrap><strong>E-Mail Address:</strong></td> <td> <?php if(Auth::LoggedIn()) { echo Auth::$userinfo->email; echo '<input type="hidden" name="name" value="'.Auth::$userinfo->email.'" />'; } else { ?> <input type="text" name="email" value="" /> <?php } ?> </td> </tr> <tr> <td><strong>Subject: </strong></td> <td><input type="text" name="subject" value="<?php echo $_POST['subject'];?>" /></td> </tr> <tr> <td><strong>Message:</strong></td> <td> <textarea name="message" cols='45' rows='5'><?php echo $_POST['message'];?></textarea> </td> </tr> <tr> <td width="1%" nowrap><strong>Captcha</strong></td> <td> <?php if(isset($captcha_error)){echo '<p class="error">'.$captcha_error.'</p>';} ?> <div class="g-recaptcha" data-sitekey="<?php echo $sitekey;?>"></div> <script type="text/javascript" src="https://www.google.com/recaptcha/api.js?hl=<?php echo $lang;?>"> </script> </td> </tr> <tr> <td> <input type="hidden" name="loggedin" value="<?php echo (Auth::LoggedIn())?'true':'false'?>" /> </td> <td> <input type="submit" name="submit" value='Send Message'> </td> </tr> </table> </form> Quote Link to comment Share on other sites More sharing options...
mattsmith Posted May 4, 2017 Author Report Share Posted May 4, 2017 On 2017-5-1 at 9:27 PM, web541 said: As stated above, can you please post the code for your custom form. If you are using the default contact page, then check here https://github.com/DavidJClark/phpvms_5.5.x/blob/master/core/modules/Contact/Contact.php#L76 and change ADMIN_EMAIL to "ceo@url.com" This is not what you are after, but in case you were wondering. https://forum.phpvms.net/topic/1317-request-contact-form-mod/?do=findComment&comment=8116 If i try changing ADMIN_EMAIL to the email address i get an error that there is an @ on line 66 Quote Link to comment Share on other sites More sharing options...
Moderators servetas Posted May 4, 2017 Moderators Report Share Posted May 4, 2017 Write the email in quotation marks ("YOUR_EMAIL"). Something like: Util::SendEmail("myemail@domain.com", $subject, $message); Quote Link to comment Share on other sites More sharing options...
mattsmith Posted May 5, 2017 Author Report Share Posted May 5, 2017 17 hours ago, servetas said: Write the email in quotation marks ("YOUR_EMAIL"). Something like: Util::SendEmail("myemail@domain.com", $subject, $message); Thanks that worked. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.