/    Sign up×
Community /Pin to ProfileBookmark

mail problem…

can anybody pls help me…i have this code(below).
————————————————————-

<?php
mail(“[email protected]“, “My Subject”, “Line 1nLine 2nLine 3”);

?>
—————————————————————

and when i try to run it it give me an error message(below).
——————————————————————-


Warning: mail(): Failed to connect to mailserver at “localhost” port 25, verify your “SMTP” and “smtp_port” setting in php.ini or use ini_set() in C:Program FilesApache GroupApache2htdocsttrymail.php on line 2
—————————————————————-

i already check my PHP configuration from phpinfo();

SMTP=localhost both local value and Master Value.
smtp_port=25 both local and master value.

can anybody pls. help me to solve this problem…tnx! ‘n advanve…

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@MallerJan 11.2005 — Did you check that the smtp server is running, and that your ISP aint blocking port 25, alot of ISP does that.

Normally you can just use the one, your ISP provide you. something like "smtp.yourisp.com"
×

Success!

Help @daimous 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.5,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...