I'm trying to use the php mail function from cmd,with following command:
php -r "\$from = \$to = '[email protected]'; \$x = mail(\$to, 'subject'.time(), 'Hello World', 'From: '. \$from); var_dump(\$x);"
I get this error: Parse error: syntax error, unexpected token "", expecting end of file in Command line code on line 1 could it be because of wrong directory ? or what am I missing in the code ?