Jump to content

echo cannaot pass the values to msmtp?


shams

Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/275039-echo-cannaot-pass-the-values-to-msmtp/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.