best way to send email from php code example
Example 1: how to send email with php
<?php
var Name = $_POST('name');
var Email = $_POST('email');
var Number = $_POST('number');
$to_email = 'Your E-mail';
$subject = 'The Subject of the message';
$message = 'Name'.$name. "email" .$email. "number:" .$number.".";
$headers = 'From: noreply @ company . com';
mail($to_email,$subject,$message,$headers);
?>
Example 2: create an email addresses php
$socket = fsockopen($cpdomain,2082);
$cuser = "YourUserName";
$cpassword = "YourPassword";
$authstr = base64_encode("".$cpuser.":".$cppass."");
$in = "GET /frontend/$cpskin/mail/doaddpop.html?email=$euser&$edomain&password=$epass"a=$equota
HTTP/1.0\r\nAuthorization: Basic $authstr \r\n";
fputs($socket,$in);
fclose( $socket );