Little Krazy Forum
Image Hosting  
Welcome Guest Search | Active Topics | Log In | Register

How to send mail in PHP Options
techguru
#1 Posted : Monday, September 21, 2009 7:40:52 AM
Rank: Newbie



Groups: Registered

Joined: 9/20/2009
Posts: 4
Points: 12
Location: Delhi
how can we send email from php
AmanBhullar
#2 Posted : Monday, September 21, 2009 7:42:31 AM
Rank: Member



Groups: Registered, Administrators

Joined: 9/20/2009
Posts: 10
Points: 33
Location: Amritsar
The first argument to this function is the recipient, the second specifies the message's subject and the third one should contain the body. So to send a simple sample message, we could use:

<?php
$to = "recipient@domain.com";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
if (mail($to, $subject, $body)) {
echo("<p>Message successfully sent!</p>");
} else {
echo("<p>Message delivery failed...</p>");
}
?>
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF 1.9.3 | YAF © 2003-2009, Yet Another Forum.NET
This page was generated in 0.044 seconds.
Home Seperator About Us Seperator Contact Us Seperator Terms of Use Seperator Privacy Policy Seperator Disclaimer
Network Sites:  ShubhRishtey.com | LittleKrazy.com | ARLiveSupport.com | TheWallpapers.co.cc
Copyright © 2009 LittleKrazy.com. All Rights Reserved