Hey Computer SCI Gal, Ma name is "Shame" and am in need of yo help! I 've been trying to write a PHP code that sends form data to any email (gmail, yahoo etc). So far, I've failed. If you can help me, Pliz be my guest and savior !!

Member Avatar for Rkeast

Use the PHP mail() function.

Syntax reference and examples can be found here on php.net

Do you wan't to mass mail, or just a single email?

Try this.. coz i've done thin in my project..
it works for me..

$to = "user@gmail.com";
	$sub = "Confirm Mail From LeLys";
	$header = "from: adminName<support@Domain.org>";
	
	$message = "confirm link \r\n";
	$message.= "click to activete your account";
	$message.= "http://www.domain.org/confirmation.php?key=$ccode";
	
	$sending = mail($to,$sub,$message,$header);
	
		if($sending)
			echo ("email comfirm");
		else
			echo("email not sent");

Try this.. coz i've done thin in my project..
it works for me..

$to = "user@gmail.com";
	$sub = "Confirm Mail From LeLys";
	$header = "from: adminName<support@Domain.org>";
	
	$message = "confirm link \r\n";
	$message.= "click to activete your account";
	$message.= "http://www.domain.org/confirmation.php?key=$ccode";
	
	$sending = mail($to,$sub,$message,$header);
	
		if($sending)
			echo ("email comfirm");
		else
			echo("email not sent");

Hi..


Plz send mail attachment code....i am fully confused with attachment code...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.