Jump to content


Photo

mail(from:) ??


  • Please log in to reply
1 reply to this topic

#1 spires

spires
  • Members
  • PipPipPip
  • Advanced Member
  • 492 posts

Posted 19 September 2006 - 04:13 PM

Hi to one and all.

I'm trying to make so when i send an email, it will have a from address.
I can do this, but, when i use the $header the 'from' dont work.

Can someone please tell me where i'm going wrong. ;D

Thanks

$link = '<a href="http://www.theeventorganiser.com/login.php">login</a>';
		$to      = 	'spires1@mail.com';
		$from      = 	'spires1@mail.com';
		$subject = 	'Hi Ric, '.$first_name.' wants you to create their profile';
		$message = 	'Hi Ric,<br>
						'.$first_name.' wants you to create their profile<br><br>
						Here is there username and password<br>
						USERNAME = '.$usname.'<br>
						PASSWORD = '.$pword.'<br><br>
						Please login here<br>'.$link.'';
		$headers  = 'MIME-Version: 1.0' . "\r\n";
		$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

		mail($to, $subject, $message, "FROM: ".$from."", $headers,);

How to make over $600 a day from AdSense? Discover EXACTLY how he does it in these videos:
http://www.adsense-online.com

#2 spires

spires
  • Members
  • PipPipPip
  • Advanced Member
  • 492 posts

Posted 19 September 2006 - 05:09 PM

Hi,

I've now got this code.
This works, but i can get the from and the MIME to work together.

Does anyone know how to join the two together?

Thanks for looking

		$link = '<a href="http://www.theeventorganiser.com/login.php">login</a>';
		$to      = 	'spires1@mail.com';
		$from      = 	'spires1@mail.com';
		$subject = 	'Hi Ric, '.$first_name.' wants you to create their profile';
		$message = 	'Hi Ric,<br>
						'.$first_name.' wants you to create their profile<br><br>
						Here is there username and password<br>
						USERNAME = '.$usname.'<br>
						PASSWORD = '.$pword.'<br><br>
						Please login here<br>'.$link.'';
		$headers  = 'MIME-Version: 1.0' . "\r\n";
		$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
		$header2 = "FROM: ".$from."";
		

		mail($to, $subject, $message, $header2, $headers);

How to make over $600 a day from AdSense? Discover EXACTLY how he does it in these videos:
http://www.adsense-online.com




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users