We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,519 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

How to configur server settings to send mail using Php

I want to send mail from my php site. But i dont have any idea about how to configur it. I am using BigRock Hosting service. And the code below shown is using now as the sendmail.php page to send mail..

<?php
$to = $to;
$subject = "My subject here";
$message = "Hello! This is a simple email message.";
$from = "Mymailaddress@example.com";
$headers = "From:" . $from;
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
?>

Please help me!!

2
Contributors
1
Reply
23 Minutes
Discussion Span
3 Months Ago
Last Updated
5
Views
manumohantkd
Newbie Poster
1 post since Oct 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

Sometimes your host will set things so that you also make use of the 5th parameter (additional parameters). This is often to set flags, e.g. of 5th param:

-f name@example.com

See your host's FAQ's about using mail(). Almost every host I've used for shared hosting accounts insist on this. Otherwise users can jojob and send emails which look as though they come from fictitious or other people's addresses.

diafol
Keep Smiling
Moderator
10,607 posts since Oct 2006
Reputation Points: 1,628
Solved Threads: 1,506
Skill Endorsements: 57

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0545 seconds using 2.66MB