0

hi
i am using php email function .in from address i am getting my ftp email id
eg username:form,my mail id is as form@connect.com but i want to give my own address...dynamically what i give.

$body1="<html><head></head><body>";
$body1.="<table width='850px' border='0' align='center' cellpadding='0' cellspacing='0' style='vertical-align:top;'>";
$body1.="<tr><td><p>If you have net banking facility you can do an online transfer of just Rs.500 to the account "; 
$body1.="</body></html>";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=iso-8859-1" . "\r\n";
if (strlen($body2)>998) {
$headers .= "Content-Transfer-Encoding: base64;" . "\r\n";
$headers .= 'From: ' . $em . "\r\n" .'X-Mailer: PHP/' . phpversion();
}
2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by mexabet
0

Try this and see if it helps:

<?php
$headers = 'From: form@connect.com' . "\r\n" .
    'Reply-To: form@connect.com' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);
?>

You can also visit http://th2.php.net/function.mail to find out more information.

You supposed to have posted the full code of the script that was giving the error, so that the community wouldn't have to guess. Doing that would most likely bring more response.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.