Log in

View Full Version : Contact Us - Other subject


Sym0n
05-30-2008, 04:12 PM
Hiya,
I've got the contact us link set up with certain subjects being sent to the person responsible for that subject option, however the inline help says that if the "other" subject is chosen it will be sent to the webmaster's email address as specified in the VB options. That's where I run into a problem.

Basically we have the webmaster's email address set as NoReply@domain.com so that PMs etc are all sent from a bounce email account and not someone's actual email address.

Is there anyway I can change sendmessage.php so that if the other subject option is chosen those emails are sent to a specific email address?

Thanks for any help or advice,

Sy

veenuisthebest
05-30-2008, 04:29 PM
i had asked the same question few days back.. it would require code edits

Sym0n
05-30-2008, 04:38 PM
I'll happily go ahead and manually edit the code as long as someone can tell me what to edit lol.

nexialys
05-30-2008, 04:50 PM
there is a addon provided in the Mods section for 3.5 or 3.6 that enable you to choose a different email for the Contact Form... choose your keywords accordingly and you will find it for sure.

veenuisthebest
05-30-2008, 05:18 PM
there is a addon provided in the Mods section for 3.5 or 3.6 that enable you to choose a different email for the Contact Form... choose your keywords accordingly and you will find it for sure.
thanks for replying sir,

yes I have used this mod earlier with vB 3.6
https://vborg.vbsupport.ru/showthread.php?t=119802

It has issues with later versions of 3.6 but i haven't tested it with 3.7. and i really do not want to install a plugin for such a small thing.

it cannot be that tough.. vB handles it all by default like this

{1} subject

but unfortunately we cannot do so with OTHER subject . There's got to be some minor code edit in sendmessage.php


Edit: Okkk its done!!

Find this:- (line 283-299 in sendmessage.php)

if (!empty($alt_email))
{
if ($destemail == $vbulletin->options['webmasteremail'])
{
$ip = IPADDRESS;
}
else
{
$ip =& $vbphrase['n_a'];
}
$destemail =& $alt_email;
}
else
{
$ip = IPADDRESS;
$destemail =& $vbulletin->options['webmasteremail'];
}

Replace with this

if (!empty($alt_email))
{
if ($destemail == $vbulletin->options['webmasteremail'])
{
$ip = IPADDRESS;
}
else
{
$ip =& $vbphrase['n_a'];
}
$destemail = "you@yourdomain.com";
}
else
{
$ip = IPADDRESS;
$destemail = "you@yourdomain.com";
}

Sym0n
05-30-2008, 06:58 PM
veenuisthebest...you truly are the best.

Thanks!

Sy