/    Sign up×
Community /Pin to ProfileBookmark

mail() server issue

Hello,

I just moved to a new host and the php mail() function isn’t working on this new server.

I have never incountered this before…it’s always just worked!

What do I need to check for? What might be causing this not to work?

The function executes properly (i.e. it doesn’t throw an error) but it doesn’t actually send the email.

Any help, gratefully recieved!

Thanks,
Rob.

to post a comment
PHP

9 Comments(s)

Copy linkTweet thisAlerts:
@benifactorMar 17.2007 — your server probably doesnt have the correct mail setup... you should problably ask them to configure it... you can also use phpinfo() to check to see if it is configured....
Copy linkTweet thisAlerts:
@nightsterauthorMar 17.2007 — Thanks.

I used phpinfo() to try and find the info but I don't know what am I looking for? Any ideas? Thanks.
Copy linkTweet thisAlerts:
@benifactorMar 17.2007 — should look something like this if its installed...



sendmail_path /usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i
Copy linkTweet thisAlerts:
@nightsterauthorMar 18.2007 — My sendmail_path is: /usr/sbin/sendmail -t -i

Looks about right. Anything else I need to check?

Thanks for your help!
Copy linkTweet thisAlerts:
@benifactorMar 18.2007 — try putting this on a new page, substituting your emailaddress with the one i have here, then open said page in your browser... then tell me if you got the message...

mail([email protected], test, testmessage);
Copy linkTweet thisAlerts:
@nightsterauthorMar 18.2007 — Nope, did that but no email recieved.
Copy linkTweet thisAlerts:
@benifactorMar 18.2007 — put my email address in there..... i will send you a private message...
Copy linkTweet thisAlerts:
@benifactorMar 18.2007 — let me know when you have loaded the page....
Copy linkTweet thisAlerts:
@benifactorMar 18.2007 — your mail function works... i just received two messages from your server.... so, replace my email address in the code i gave you with yours and refresh....
×

Success!

Help @nightster 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.16,
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,
)...