Extension talk:FormHandler send form by Email/Archive 1

Quick question....is anyone else having this problem? Whenever I submit the form I get the following error.

Fatal error: Call to a member function toString on a non-object in /opt/lampp/htdocs/includes/UserMailer.php on line 123

Can anyone help?

Perhaps a dumb question, but what's to stop someone from creating their own form and using that to send spam/malware/whatever?


 * As noted in the Installation section:
 * To avoid spam, you should make sure that only trusted users can edit the pages which use the extension.
 * The primary goal of this extension was to avoid writing full html forms inside the wiki, which would introduce the much larger risk of users injecting javascript or anything into a wiki page.
 * Better possibilities could be
 * * limit the number of emails to be sent through the form by the same address.
 * * implement a configuration setting to limit the possible target addresses of the form, so at worst the admins are mailbombed, which can be done using normal email software as well.
 * If anybody feels like doing this, contact me. -- Dbu, 2006-03-27

I may be misunderstanding how this extension works, but what's to stop a spammer from coming along and setting up their own page using this extension? They don't necessarily have to use pages you've set up, if they know the proper syntax they can set up their own.

Comment: Perhaps the extension should be changed to store source and target e-mail addresses somewhere in the MediaWiki: namespace, instead of accepting raw e-mail addresses as parameters? That way, the msg code used to translate the user interface into other languages could be re-used to look up the e-mail addresses to be used. MediaWiki: is by default protected so that only +sysop have access to edit there, preventing the code from being used to send spam to arbitrary addresses other than those preconfigured by admins. --66.102.65.40 11:56, 16 June 2006 (UTC)

"Sender" vs "Email"
What's the difference between "Sender" and "Email"? --Yonghokim 06:58, 28 October 2006 (UTC)

Fixes for MediaWiki 1.8x
I just installed this on media wiki 1.8x, in order to make it work I had to make the following changes:

lines 248 and 249 needed to be switched, UserMailer.php wanted to then from, not from then to. Also lines 248 and 249 needed to send over MailAddress objects, not email addresses, so those were created. Updated code block is shown below.

$error = userMailer( new MailAddress( $this->target ),                            new MailAddress( $this->sender ),                             'Contact form '.$this->argv['name'],                             $message,                             $usermail);

Extension not working
I installed this extension and everything seems to be fine except when I click "Submit Query" I get forwarded to an invalid page, it looks as though I am being sent to the root directory of my domain such as domainname.com/Form, rather then an authentic wiki style link such as "domainname.com/index.php?title=Form."

Any ideas why?

Thanks!