TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
How to send mail using PHP
Bhushan Singh
Oct 27
2014
Code
1.6
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
<?php
$to
=
"
[email protected]
"
;
// send mail
$subject
=
"dummy test"
;
// mail subject`
$body
=
"Body of your message here you can use HTML too. "
;
$headers
=
"From:
[email protected]
\r\n"
;
// mail from
$headers
.=
"Reply-To:
[email protected]
\r\n"
;
$headers
.=
"Return-Path:
[email protected]
\r\n"
;
$headers
.=
"X-Mailer: PHP5\n"
;
$headers
.=
'MIME-Version: 1.0'
.
"\n"
;
$headers
.=
'Content-type: text/html; charset=iso-8859-1'
.
"\r\n"
;
mail(
$to
,
$subject
,
$body
,
$headers
);
?>
send mail
mail send
send mail using php