noobh Posted July 3, 2007 Share Posted July 3, 2007 im new to php <?php $to="myemail@yahoo.com"; $subject="Testing Purposes"; $message="This is my message"; $headers="From: samle@yahoo.com"; mail($to,$subject,$message,$headers); ?> this one goes to the bulk!!! what i want i to send i to inbox any ide thanks in advance Quote Link to comment Share on other sites More sharing options...
skali Posted July 3, 2007 Share Posted July 3, 2007 try changing the from address and give some proper subject. Quote Link to comment Share on other sites More sharing options...
jagat21 Posted July 3, 2007 Share Posted July 3, 2007 For sending email to inbox, you have to set some headers in your email header section. Following are some of the headers that u can provide : $headers .= 'From: webmaster@example.com' . "\r\n"; // Sender's Email Address $headers .= 'Return-Path: MyName <myname@myhost.com> /n'; // Indicates Return-path $headers .= 'Reply-To: MyName <myname@myhost.com> /n'; // Reply-to Address $headers .= 'X-Mailer: PHP/' . phpversion(); // For X-Mailer $headers .= '"Content-type: text/plain; charset=iso-8859-1"'; // Set Content Type For Text Email Add this headers and try again to send the email. Quote Link to comment Share on other sites More sharing options...
noobh Posted July 3, 2007 Author Share Posted July 3, 2007 Thanks bro it works Quote Link to comment Share on other sites More sharing options...
muhammad_naveed Posted October 27, 2010 Share Posted October 27, 2010 Sir i try with proper email adress, But not work, Wamp creat an error Stmp and port 25, so please help meee... Quote Link to comment Share on other sites More sharing options...
Maq Posted October 27, 2010 Share Posted October 27, 2010 Sir i try with proper email adress, But not work, Wamp creat an error Stmp and port 25, so please help meee... You would have better luck creating your old thread, this is from 2007. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.