Hello
On my linode I want to use Google's smtp servers to send some emails. I have the mailx program installed and this works great from bash.
Code:
# echo "This is a test email" | mail -v -s "Test email" someone@somewhere.com
All I need is to be able to provide the body, subject and to address from a PHP script and forward it to bash (anyway to do it inside PHP?) so it can send it away. I just need to send emails.. and can't get sendmail package working.
I am not much of a programmer so any help is very appreciated.. I was thinking of something along the lines.
Code:
<?php
mailfunction ($to, $body, $subject) {
echo exec('echo $body | mail -v -s $subject $to');
>
Any chance something like that can work? Or if the syntax of the "echo" command inside exec is even correct. Thanks for any help/pointers.
