Jump to content

Mail Function Inquiry 2nd Time Around PLEASE HELP ME!!!


neo777ph

Recommended Posts

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 Values
Returns 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!
Link to comment
Share on other sites

To >> kevinkorb

I 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?
Link to comment
Share on other sites

[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
Link to comment
Share on other sites

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. \n
Kindly 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";
}
Link to comment
Share on other sites

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. \n
Kindly 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. \n
Kindly see link http://egb1j004c57fga9/otapproval.php?ot=".$result3;

$send = mail($otap, "$name requested OT", $mess, $headers, $fifthp);
?>[/code]

Ken
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.