Kullanıcı Tavsiye E-Vücut

1 Cevap

Aşağıdaki kod harika çalışıyor. Bir kullanıcı benim site tavsiye etmek için diğer insanlara e-postalar göndermenizi sağlar.

Nasıl $ _POST ['Yayıncı'] ile "Michael" altında değiştirebilirsiniz? Ben denedim ve işe yaramadı.

Teşekkür peşin,

John

 $msg = "<html><body>Hello, your friend Michael recommends that you use <a href='http://www.site.com/'>site.com</a>  Please visit the site.<br><br><img src='http://site.com/images/blacklogo.PNG'></body></html>";
    $subject = "Try out Site.com";
    $headers  = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    $headers .= 'From: ' . $_POST['sendername'] . "\r\n";
    foreach($_POST['email'] as $email){
    mail($email, $subject,$msg,$headers);
    }

1 Cevap

Basitçe:

 $msg = "<html><body> … ".htmlspecialchars($_POST['sendername'])." … </body></html>";