PHP mail() function

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
Sephirangel
Forum Commoner
Posts: 45
Joined: Tue Jul 15, 2008 1:37 pm

PHP mail() function

Post by Sephirangel »

Hello guys,

I have a little problem with the mail() function I have implemented into a clients system.

After months of it working properly, obtaining the data from the database and creating the email message, and finally calling mail() with all the correct variables, I get a timeout error after the default 30 seconds at the mail() function in the code.

However, the strange thing is, the emails are still being sent normally. However, the code after that is not executing.

Any ideas as to why this might have suddenly started happening? No change in PHP, MySQL or WAMP server version has occured and no updates have been implemented.

Many thanks in advance!
narensuri
Forum Newbie
Posts: 1
Joined: Fri Apr 24, 2009 7:37 am

Re: PHP mail() function

Post by narensuri »

hai this is naren.
i want to send mail using smtp(smtp.gmail.com over port_no 465) using php,but iam unable to send it,i got a warning


Warning: mail() [function.mail]: Failed to connect to mailserver at "smtp.gmail.com" port 465, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() (but though i have changed the settings SMTP=smtp.gmail.com smtp_port=465) but still no use.can some one help me out.
can u send me the reply to narenjaz@gmail.com.
Sephirangel
Forum Commoner
Posts: 45
Joined: Tue Jul 15, 2008 1:37 pm

Re: PHP mail() function

Post by Sephirangel »

I think thats because you need to authenticate with Gmail. Try using PEAR php code to send your emails.

As for my problem, it is still unsolved! Any ideas?
Post Reply