Hello!
I have a contact form on my website. I have a custom email function(below). My problem is - I don't know how to include 'Some text + the submitted form's subject' when sending a confirmation email.
I tried:
@custommail ($POST['submit_by'],"Confirmation Receipt regarding: $POST['subject']",$msg,"info@mydomain.com");
but it didn't work.
Will you help me please? I've been stuck with it for the last 36 hrs... Thanks!
Tammy
==============================
EMAIL FUNCTION:
<?
function custommail($to,$subject,$body,$from="info@mydomain.com")
{
@require_once ("./phpm/class.phpmailer.php");
@require_once ("./phpm/class.smtp.php");
$mail = new phpmailer();
$mail->From = $from; //$sender
$mail->FromName = $from; //$sender
$mail->IsSMTP(); // set mailer to use SMTP
$mail->Host = "localhost";
$mail->Subject = $subject;
$mail->Body = $body;
$mail->AddAddress ($to); //receiver
return $mail->Send();
}[