Jump to content


Photo

echo cannaot pass the values to msmtp?


  • Please log in to reply
No replies to this topic

#1 shams

shams

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts
  • LocationKabul

Posted 28 February 2013 - 01:37 AM

With the running code below msmtp send the empty email to the reciepient  without any subject, From, To and message (body) :

<?php

$from = $_POST['from'];
$To = $_POST['To'];
$subject = $_POST['subject'];
$message = $_POST['message'];
$account = $_POST['account'];

ob_start();
echo "Subject:\n".$subject."\n To:".$To."\n From:". $from."\n\n".$message;
$str = ob_get_contents();
ob_end_clean();

exec("echo $str | msmtp --account=$account -f $from $To");
?>

Didn't get all the values from the echo command, any help please?


Edited by shams, 28 February 2013 - 01:44 AM.

Fedora For Newbies
Linux For Newbies




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com