wampserver + gmail free smtp server
Posted by: willietck (60.53.30.---)
Date: March 25, 2008 08:41PM

Hi, i've configure few lines in php.ini [mail function]

SMTP = smtp.gmail.com
smtp_port = 587
sendmail_from = myemail@gmail.com

after i saved and restart wampserver, i try to run the following php script to test to send an email. Here's the simple script.

<?php
// The message
$message = "Line 1\nLine 2\nLine 3";

// In case any of our lines are larger than 70 characters, we should use wordwrap()
$message = wordwrap($message, 70);

// Send
mail('myemail@yahoo.com', 'My Subject', $message);
?>

after i run this script, which supposedly be sending an email to myemail@yahoo.com as a testrun, but instead of receiving the testrun email, i get these error:

Warning: mail() [function.mail]: SMTP server response: 530 5.7.0 Must issue a STARTTLS command first 30sm16179828wfc.6 in C:\wamp\www\mailtest.php on line 9

-------------------------------------------------------------------------
line 9 = mail('myemail@yahoo.com', 'My Subject', $message);

What steps that i missed out? Or what mistake that i've made?

plz help sad smiley

Options: ReplyQuote
Re: wampserver + gmail free smtp server
Posted by: yfastud (Moderator)
Date: March 25, 2008 10:54PM

Wamp does NOT come w/ mail server, so you should either seek help from other sources or sign up for some free mail server out there and implement your script w/ info they provide to you

This thread will be closed

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: wampserver + gmail free smtp server
Posted by: willietck (60.53.30.---)
Date: March 26, 2008 02:56AM

i do stated that im using gmail free smtp server did i?

Options: ReplyQuote
Re: wampserver + gmail free smtp server
Posted by: elyisus (200.94.233.---)
Date: March 26, 2008 04:22AM

First make sure to issue a STARTTLS command first 30sm16179828wfc.6 in C:\wamp\www\mailtest.php on line 9

Looks there is code missing, a STARTTLS command.

What is a STARTTLS?

STARTTLS is the ESMTP keyword used to initiate a secure SMTP connection between two servers using the Secure Sockets Layer (SSL) (also known as TLS).

If that sounds like the missing thing, then you may be interested in further knowledge.

Check: [www.sendmail.org]

I mean, if you have not solved it already!

Enjoy

Options: ReplyQuote
Re: wampserver + gmail free smtp server
Posted by: yfastud (Moderator)
Date: March 26, 2008 04:38AM

Quote

i do stated that im using gmail free smtp server did i?
Yes, you did, and that's the problem since as far as I know google allow people to use their email service but NOT their mail server. BTW, in order to use google mail server, your script must include their authentication codes in order to connect to their mail servers and that codes change very often :-(

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote


Sorry, only registered users may post in this forum.