neo777ph Posted January 29, 2007 Share Posted January 29, 2007 Hi..I had this problem since last week i can't find a solution..i used the Mail() function for sending mail on my PHP built Internal system.My mail sending works intermittently..ON & OFF -- I want it to be consistent in mail sending..though it does not show an error message that the message was not sent,,so i assuming that it was sent.However, when i had read the PHP.net documentation on the mail function it states that :"Mail Function Return ValuesReturns TRUE if the mail was successfully accepted for delivery, FALSE otherwise. It is important to note that just because the mail was accepted for delivery, it does NOT mean the mail will actually reach the intended destination. "My Question:given this statement how can i make sure the mail is always received by my recipients?FACTS:My mail server is an Exchange Server located at malaysia..I am at (webserver@Philippines).There are two specific users of my system that cannot sent mails on each other via my PHP system.PHP TRIAD -- PHP 5.0 Apache 2.0 MySQL Db..Spec.. 3.0 GHz Celeron and 512 MB memory..Please I would appreciate your help! Thanks a lot! Quote Link to comment Share on other sites More sharing options...
kevinkorb Posted January 29, 2007 Share Posted January 29, 2007 I would think if you put your email address (or an email you could check) as the sender, any bounces would go back to you. Quote Link to comment Share on other sites More sharing options...
neo777ph Posted January 29, 2007 Author Share Posted January 29, 2007 To >> kevinkorbI tried that already and i was receiving my own mail..However.. There are cases that people who recieve mails via my system goes directly to thier junk mail..Others could not even receive each others mail via my system..I just want to know: How Can I assure that every Mail() that was accepted for sending would be received by the recipient? Quote Link to comment Share on other sites More sharing options...
spfoonnewb Posted January 29, 2007 Share Posted January 29, 2007 [quote author=neo777ph link=topic=124478.msg515813#msg515813 date=1170033913]..Others could not even receive each others mail via my system..[/quote]Are your IP's blacklisted to them? Quote Link to comment Share on other sites More sharing options...
neo777ph Posted January 29, 2007 Author Share Posted January 29, 2007 Nope they are not blocked.. Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted January 29, 2007 Share Posted January 29, 2007 [quote]My Question:given this statement how can i make sure the mail is always received by my recipients?[/quote]Short answer: you can't.Can you post how your script is sending the email? There may be ways to to get around the email going to the junk folder.Ken Quote Link to comment Share on other sites More sharing options...
Jessica Posted January 29, 2007 Share Posted January 29, 2007 If you don't include all the additional headers, it's more likely to be marked spam. Quote Link to comment Share on other sites More sharing options...
neo777ph Posted January 29, 2007 Author Share Posted January 29, 2007 NOTES: $otap ,$name $result3 came from my database..I did not use any headers,,So it would be plain text..$mess="Dear reciever, Requestor needs approval of his/her overtime. \nKindly see link http://egb1j004c57fga9/otapproval.php?ot=".$result3; $send = mail("$otap", "$name requested OT", "$mess"); if($send == true){echo "Your message was sent to : ";echo $otap;}else {echo "Sorry, somethings not quite right";} Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted January 29, 2007 Share Posted January 29, 2007 At the very least add a "From:" header:[code]<?php$headers = 'From: Your Name <youremail@address.here.com>';$mess="Dear reciever, Requestor needs approval of his/her overtime. \nKindly see link http://egb1j004c57fga9/otapproval.php?ot=".$result3;$send = mail($otap, "$name requested OT", $mess, $headers);?>[/code]If that doesn't work, add the fifth parameter:[code]<?php$fifthp = '-f youremail@address.here.com';$headers = 'From: Your Name <youremail@address.here.com>';$mess="Dear reciever, Requestor needs approval of his/her overtime. \nKindly see link http://egb1j004c57fga9/otapproval.php?ot=".$result3;$send = mail($otap, "$name requested OT", $mess, $headers, $fifthp);?>[/code]Ken Quote Link to comment Share on other sites More sharing options...
neo777ph Posted January 29, 2007 Author Share Posted January 29, 2007 If i would use the 5th parameter..Do i need To configure the sendmail_path? I had read that it was only (sendmail_path) use for UNIX system..Please help thnx..As I understand it..the 5th parameter promotes my email as a trusted one..removing my mail into a SPAM classification? Am I right? 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.