fail to send mail

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
naik.jayashri
Forum Newbie
Posts: 1
Joined: Tue Nov 24, 2009 7:09 am

fail to send mail

Post by naik.jayashri »

i m writing simple php mail function
mail($to,$subject,$message)
while sending mail i did not get any error, but in the mail box i did not receive any mail.
whts the problem? need to do any settings?
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Re: fail to send mail

Post by superdezign »

Your server needs an SMTP connection, I believe. If it isn't set up, then mail() will do nothing. I think there is a way to create one in PHP, but I'm not sure of how to do it myself. Try using SwiftMailer. It has the capability for you to connect to an SMTP server to send your e-mail with.
Post Reply