Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Can PHP mail but silverstripe userforms will not mail

Go to End

4 Posts   1705 Views


Community Member, 7 Posts

26 June 2010 at 12:21am

Edited: 26/06/2010 12:25am

Can php mail() and send mail from bash Shell

But userforms will not mail.

Where can I start to troubleshoot this?



Forum Moderator, 5521 Posts

26 June 2010 at 1:06pm

UserForms uses the built in silverstripe Email class. You could setup a quick test using SilverStripe mail. If this works then its something in the module (like a configuration)

// mysite/code/Page.php

function TestEmail() {

$mail = new Email('[email protected]', '[email protected]', "test", "test");

return $mail->send();

Then include $TestEmail in your template.

Also check that you have a defined 'from' and 'to' address in your UserForms email tab. Some servers also require you to use a from address from a domain on the server.


Community Member, 7 Posts

29 June 2010 at 2:44am


Thanks for the troubleshooting direction.. That code worked flawlessly and sent an email when i visted the page.. I double checked the from and to and used the same from i used in that test and still nothing from userforms..



Community Member, 7 Posts

29 June 2010 at 3:29am

Edited: 29/06/2010 8:52am

Arrrghhhh.. Hey man, sorry, just forget about this post.. been working too much i guess..

There is nothing wrong with the userforms module.. it was user idiot error..

although I had a to: address in the settings I inadvertently must have checked the: or use a field for the form, and had something random selected in there.. amazing how something so simple is not evident when you stare at it for too long..

Sorry to waste your time..;D