from in email

Reply

Join Date: Nov 2007
Posts: 183
Reputation: lydia21 is an unknown quantity at this point 
Solved Threads: 5
lydia21 lydia21 is offline Offline
Junior Poster

from in email

 
0
  #1
Sep 11th, 2008
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();
}
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 183
Reputation: lydia21 is an unknown quantity at this point 
Solved Threads: 5
lydia21 lydia21 is offline Offline
Junior Poster

Re: from in email

 
0
  #2
Sep 15th, 2008
hi
can anybody help in email.i want how to give from address.
eg
$from="l.w@gmail.com"
but in my mail i am getting from addr as
l.w@bluehost.com
bluehost is my server name
please tell me how to avoid this
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 142
Reputation: mexabet is an unknown quantity at this point 
Solved Threads: 9
mexabet's Avatar
mexabet mexabet is offline Offline
Junior Poster

Re: from in email

 
0
  #3
Sep 16th, 2008
Try this and see if it helps:

  1. <?php
  2. $headers = 'From: form@connect.com' . "\r\n" .
  3. 'Reply-To: form@connect.com' . "\r\n" .
  4. 'X-Mailer: PHP/' . phpversion();
  5.  
  6. mail($to, $subject, $message, $headers);
  7. ?>

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.
Last edited by mexabet; Sep 16th, 2008 at 9:51 am.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 476 | Replies: 2
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC