Jump to content

[SOLVED] php mail problem on wamp


Recommended Posts

hi...someone pleeeeeeeease help me on php mail problem on WAMP.

 

code:

<?php

mail("mymail@gmail.com","Hello World","Hi,this is my first php  *****ofcourse i have used a proper mail id!*******

 

mail!!");

?>

 

 

where do i set up the smtp port?...or what do i need to do..

 

i have modified php.ini as follows:

[mail function]

; For Win32 only.

SMTP = smtp.gmail.com

 

; For Win32 only.

sendmail_from = mymail@gmail.com  *****ofcourse i have used a proper mail id!*******

 

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").

;sendmail_path =

 

i get this error:

 

Warning: mail() [function.mail]: SMTP server response: 530 5.7.0 Must issue a STARTTLS command first m24sm2469571waf in C:\wamp\www\play\firstmail.php on line 2

 

if am missing too much on basics....please help me from scratch..i am new and i ahve spent more than 10 days struggling now...!

pleeeeeeeeeease!

thanks,

vk

Link to comment
Share on other sites

You cannot use gmail as an SMTP Server as mail() does not support authentication. GMail requires authentication in order for email to be sent from their servers.

 

mail works fine. It's just you got to use a non-secured SMTP server in order for mail to work.

Link to comment
Share on other sites

i have finally got it working with swiftmailer!

it works for wamp..

works for gmail too..

its an offshoot of phpmailer...but its better i guess...and i dont think phpmailer allowse TSL or SSL like swiftmailer, which is reqd for gmail..

needless to say abt the other zillion good features of swiftmailer!

Link to comment
Share on other sites

  • 3 weeks later...

i have finally got it working with swiftmailer!

it works for wamp..

works for gmail too..

its an offshoot of phpmailer...but its better i guess...and i dont think phpmailer allowse TSL or SSL like swiftmailer, which is reqd for gmail..

needless to say abt the other zillion good features of swiftmailer!

 

Hi

 

I have a problem with php doesn't support ssl and tls.

 

I have seen many posts telling me to uncommented the extension=php_openssl. When I used the command php -m, it did show me the openssl. But when using phpinfo(), it only list udp and tcp.

 

Do you know how to set it up? Please help. 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.