mail function

Ecample 1

// Send the email
$to      = $_POST['email'];
$from    = "";
$subject = "New password";

$msg     = <<< EOMSG
You recently requested that we send you a new password for Your new password is:


Please log in at this URL:


Then go to this address to change your password:


$mailsend = mail("$to","$subject","$msg","From:

Example 2

          // Send the confirmation email
          $encoded_email = urlencode($_POST['email']);
          $mail_body = <<<EOMAILBODY
Thank you for registering at Click this link
to confirm your registration:$hash&email=$encoded_email

Once you see a confirmation message, you will be logged into
          mail($email, ' registration confirmation',
            $mail_body, 'From:');
          // Give a successful registration message
            You will receive a confirmation email soon';
          return $feedback;

About samehramzylabib

See About on
This entry was posted in Coding, PHP Email and tagged , , . Bookmark the permalink.


Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s