From: Shreyas Agasthya on 1 Jul 2010 09:09 PHP'ers, I am sure this would have been asked a zillion times but I take this as my turn to get some help. I hate to ask such rhetorical questions but quite couldn't understand how to tweak this. All I am trying to do is send a mail from my localhost to my Gmail ID. I read stuff about how the SMTP port should be accessible; should be open et al. My set-up is very simple: 1. Using Easy PHP. 2. Windows XP Also, when the comment says that you need to 'configure' your php.ini, which ..ini should I modify? The reason being, I see that file in two locations, apparently. (i) C:\Program Files\EasyPHP 3.0\apache (ii) C:\Program Files\EasyPHP 3.0\conf_files *My php.ini (will remove the semi-colon)* * * ; For Win32 only. ;SMTP = localhost ;smtp_port = 25 ; For Win32 only. ;sendmail_from = me(a)example.com *My code: * * * * <?php * $from= "shreyasbr(a)gmail.com"; $to ="shreyasbr(a)gmail.com"; $subject = "PHP Testing"; $message = "Test Me"; mail ($to,$subject,$message,'From:'.$from); ?> * * * Regards, *Shreyas Agasthya
From: Andrew Ballard on 1 Jul 2010 09:22 On Thu, Jul 1, 2010 at 9:09 AM, Shreyas Agasthya <shreyasbr(a)gmail.com> wrote: > Also, when the comment says that you need to 'configure' your php.ini, which > .ini should I modify? The reason being, I see that file in two locations, > apparently. > (i) C:\Program Files\EasyPHP 3.0\apache > (ii) C:\Program Files\EasyPHP 3.0\conf_files Call this in a script running under your web server: http://www.php.net/phpinfo Alternatively, you could also look at these: http://www.php.net/php-ini-loaded-file http://www.php.net/php-ini-scanned-files Andrew
From: Daniel Brown on 1 Jul 2010 10:16 On Thu, Jul 1, 2010 at 10:02, Shreyas Agasthya <shreyasbr(a)gmail.com> wrote: > Spoke too fast. > > Fixed that (SMTP has to be uppercase) > > Now it is : *SMTP server response: 530 5.7.0 Must issue a STARTTLS command > first. c15sm7128213rvi.11* (Quick note: per the list guidelines, please don't top-post in threads.) That error message is because you're trying to connect to an SMTPS (secure, SSL-encrypted SMTP) server using plain text, which won't work. If you have a plain SMTP server running, try that to get one thing resolved at a time. Change the port to 25 in your php.ini (and, again, restart Apache) if plain SMTP is available on the default port. -- </Daniel P. Brown> UNADVERTISED DEDICATED SERVER SPECIALS SAME-DAY SETUP Just ask me what we're offering today! daniel.brown(a)parasane.net || danbrown(a)php.net http://www.parasane.net/ || http://www.pilotpig.net/
From: Shreyas Agasthya on 1 Jul 2010 11:12 Not sure where I am top-posting. I posted to my own mail so that one gets to know the latest. Nevertheless, I wouldn't go against the guidelines as I completely understand the havoc that it can create. The port is 587 as per Google; SMTP that I am using is Google's (anything wrong here?). If there is a rudimentary mistake that I am doing, please guide me. Regards, Shreyas On Thu, Jul 1, 2010 at 7:46 PM, Daniel Brown <danbrown(a)php.net> wrote: > On Thu, Jul 1, 2010 at 10:02, Shreyas Agasthya <shreyasbr(a)gmail.com> > wrote: > > Spoke too fast. > > > > Fixed that (SMTP has to be uppercase) > > > > Now it is : *SMTP server response: 530 5.7.0 Must issue a STARTTLS > command > > first. c15sm7128213rvi.11* > > (Quick note: per the list guidelines, please don't top-post in threads.) > > That error message is because you're trying to connect to an SMTPS > (secure, SSL-encrypted SMTP) server using plain text, which won't > work. If you have a plain SMTP server running, try that to get one > thing resolved at a time. Change the port to 25 in your php.ini (and, > again, restart Apache) if plain SMTP is available on the default port. > > -- > </Daniel P. Brown> > UNADVERTISED DEDICATED SERVER SPECIALS > SAME-DAY SETUP > Just ask me what we're offering today! > daniel.brown(a)parasane.net || danbrown(a)php.net > http://www.parasane.net/ || http://www.pilotpig.net/ > -- Regards, Shreyas Agasthya
From: Shreyas Agasthya on 1 Jul 2010 18:54
Trying again; most likely I cannot do this without SSL. --Shreyas On Thu, Jul 1, 2010 at 8:42 PM, Shreyas Agasthya <shreyasbr(a)gmail.com>wrote: > Not sure where I am top-posting. I posted to my own mail so that one gets > to know the latest. Nevertheless, I wouldn't go against the guidelines as I > completely understand the havoc that it can create. > > The port is 587 as per Google; SMTP that I am using > is Google's (anything wrong here?). If there is a rudimentary mistake that I > am doing, please guide me. > > Regards, > Shreyas > > On Thu, Jul 1, 2010 at 7:46 PM, Daniel Brown <danbrown(a)php.net> wrote: > >> On Thu, Jul 1, 2010 at 10:02, Shreyas Agasthya <shreyasbr(a)gmail.com> >> wrote: >> > Spoke too fast. >> > >> > Fixed that (SMTP has to be uppercase) >> > >> > Now it is : *SMTP server response: 530 5.7.0 Must issue a STARTTLS >> command >> > first. c15sm7128213rvi.11* >> >> (Quick note: per the list guidelines, please don't top-post in >> threads.) >> >> That error message is because you're trying to connect to an SMTPS >> (secure, SSL-encrypted SMTP) server using plain text, which won't >> work. If you have a plain SMTP server running, try that to get one >> thing resolved at a time. Change the port to 25 in your php.ini (and, >> again, restart Apache) if plain SMTP is available on the default port. >> >> -- >> </Daniel P. Brown> >> UNADVERTISED DEDICATED SERVER SPECIALS >> SAME-DAY SETUP >> Just ask me what we're offering today! >> daniel.brown(a)parasane.net || danbrown(a)php.net >> http://www.parasane.net/ || http://www.pilotpig.net/ >> > > > > -- > Regards, > Shreyas Agasthya > -- Regards, Shreyas Agasthya |