Page 1 of 1

Contact form: how to insert a prefix in the subject?

Posted: Mon Apr 23, 2007 7:48 pm
by Cutter
Hello!

I'm using the contact_form plugin which is great. I managed to translate it in French. But I didn't find out how to add a prefix to the subject of a message. I know there is a way to display a default subject which can be modified by the user, but what I want is that the prefix doesn't show up to the visitor. I want to know when an e-mail is arriving from this contact form, so I thought about the output subject to look like this: "[From the website contact form] (Some user-chosen subject)".

Please help.
Thanks.

Re: Contact form: how to insert a prefix in the subject?

Posted: Mon Apr 23, 2007 8:29 pm
by Dee
On line 91 of plugins/function.contact_form.php add the prefix when sending the mail. Change:

Code: Select all

		elseif (@mail($to, $subject, $message, $extra)) {
to:

Code: Select all

		elseif (@mail($to, '[From the website contact form] ' . $subject, $message, $extra)) {
Regards,
D

Re: Contact form: how to insert a prefix in the subject?

Posted: Mon Apr 23, 2007 10:17 pm
by Cutter
Thanks! :D