f



i am getting error while sending mail using mail() function

i am getting following error.

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() in D:\LUGUBA\root\site\temp5.php on line 8

i have done the following

(1) in php.ini file

SMTP = smtp.gmail.com
smtp_port = 465
sendmail_from = kathlal.panjabi@gmail.com

(2)

i am sendig mail using mail() function and i am passing only defaulst
arguments to,subject,body

is it enough to send a mail or something is missing??

and do not i need to give password of my above email address
kathlal.panjabi@gmail.com

thxs for help in advance.......

0
4/6/2005 9:35:56 AM
comp.lang.php 32646 articles. 0 followers. Post Follow

3 Replies
1429 Views

Similar Articles

[PageSpeed] 47

vishal wrote:

> i am getting following error.
> 
> 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() in D:\LUGUBA\root\site\temp5.php on line 8
> 

I think it's very nlikely that Gmail will allow relaying, although you
should be able to send to your own account. Port 465 is for SMPTS (i.e. SSL
wrapped SMTP)

C.

0
4/6/2005 10:32:08 AM
*** vishal wrote/escribi� (6 Apr 2005 02:35:56 -0700):
> SMTP = smtp.gmail.com
> smtp_port = 465
> sendmail_from = kathlal.panjabi@gmail.com

Gmail's SMTP server only allows encrypted connections; it also requires a
username and password. I don't think that mail() function can do such a
job. You should find a different function to send mail. There're some
clases in pear.php.net that may do the trick.




-- 
-- �lvaro G. Vicario - Burgos, Spain
-- Don't e-mail me your questions, post them to the group
--
0
4/6/2005 2:58:49 PM
vishal wrote:
> i am getting following error.
>
> 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() in D:\LUGUBA\root\site\temp5.php on line
8
<snip>

   Question flagged for FAQ. Should do it later.

--
  <?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com    Blog: http://rajeshanbiah.blogspot.com/

0
ng4rrjanbiah (1570)
4/7/2005 3:02:28 AM
Reply: