/    Sign up×
Community /Pin to ProfileBookmark

mail() problem

Hi,

In my linux server “sendmail” is installed.

I am using function mail() and getting result TRUE but I am not getting mail in my mail box.

Should “sendmail” service keep running in the server or it is enough to have installed, or any other configuration needed, please help.

Regards
mrislam

to post a comment
PHP

4 Comments(s)

Copy linkTweet thisAlerts:
@JonaMar 02.2005 — [font=trebuchet ms]Can you show us some code? Usually this is a really simple syntax problem where no error occurs internally, but there is a mistake with the address mail is sent to or other header information. An example would be if you backslash the @-symbol in the "to:" field, the email will never arrive at the desired location but it will be sent. Perhaps the email is being sent, just not received?[/font]
Copy linkTweet thisAlerts:
@mrislamauthorMar 02.2005 — The code I used is as follows:

<?

$test = mail("[email protected]","test", "test", "From:me rn ");

echo "test : ".$test;

?>

I am getting output as follows

test : 1

regards

mrislam
Copy linkTweet thisAlerts:
@BuezaWebDevMar 02.2005 — [i]Originally posted by mrislam [/i]

[B]The code I used is as follows:

<?

$test = mail("[email protected]","test", "test", "From:me rn ");

echo "test : ".$test;

?>



I am getting output as follows

test : 1



regards

mrislam [/B]
[/QUOTE]


That's weird. That looks syntactically correct to me. Hrmm..

This is what I have for one of my mail functions....

[code=php]
mail("[email protected]", "The Source: New comment", "$name said: nnn$comment", "From: $emailn");
[/code]
Copy linkTweet thisAlerts:
@bokehMar 02.2005 — On my machine (windows) the mail function will return true as long as php can communicate with the mail server but sometimes if I send a number of similar emails the firewall stops the mail server sending them out even though php believes they have been sent.

So maybe something in the mail server at fault in your case also.
×

Success!

Help @mrislam spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...