I am tired on finding out solutions on how to configure php ini to send email using yahho or gmail. When I use the mil function it doesn't gives me any error but I don't receive the mail also.
Asked
Active
Viewed 1,139 times
-2
-
See http://stackoverflow.com/questions/4095289/how-to-configure-php-ini-to-use-gmail-as-mail-server – Mihai8 Mar 10 '13 at 13:25
-
I like PHPMailer. You can see how to use it here http://stackoverflow.com/a/8629554/1477388 which is a solution for gmail smtp, but you can use it for yahoo smtp, too. You can download it here http://sourceforge.net/projects/phpmailer/files/phpmailer%20for%20php4/0.90/ – user1477388 Mar 10 '13 at 13:26
1 Answers
0
You can config the section '[mail function]' in php.ini. And set SMTP to your SMTP Server, and smtp_port set to 25 which is the standard port used for SMTP connections.
In gmail, the setting is like below:
SMTP: smtp.gmail.com
Port for TLS/STARTTLS: 587
Port for SSL: 465
Hope this help you.
-
hey Thanks..what is this Port for TLS/STARTTLS: 587?? Where can I find that? – subhro Mar 10 '13 at 13:44
-
I think you can try the following code, and you'll get know what I mean. $mail= new PHPMailer(); $mail->IsSMTP(); $mail->Host = "smtp.gmail.com"; $mail->Port = 587; $mail->CharSet = "utf-8"; $mail->Username = "xxx@gmail.com"; $mail->Password = "your password"; – waynner Mar 10 '13 at 15:08