943,852 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 541
  • PHP RSS
Sep 11th, 2008
0

from in email

Expand Post »
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();
}
Similar Threads
Reputation Points: 19
Solved Threads: 5
Junior Poster
lydia21 is offline Offline
183 posts
since Nov 2007
Sep 15th, 2008
0

Re: from in email

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
Reputation Points: 19
Solved Threads: 5
Junior Poster
lydia21 is offline Offline
183 posts
since Nov 2007
Sep 16th, 2008
0

Re: from in email

Try this and see if it helps:

PHP Syntax (Toggle Plain Text)
  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.
Reputation Points: 16
Solved Threads: 9
Junior Poster
mexabet is offline Offline
148 posts
since Mar 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Grid problems
Next Thread in PHP Forum Timeline: sleep function





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC