mail() + localhost
| From: | Shreyas Agasthya | Date: | Thu, 01 Jul 2010 13:09:53 +0000 |
| Subject: | mail() + localhost | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-306597@lists.php.net to get a copy of this message | ||
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@example.com
*My code: *
*
*
*
<?php
*
$from= "shreyasbr@gmail.com";
$to ="shreyasbr@gmail.com";
$subject = "PHP Testing";
$message = "Test Me";
mail ($to,$subject,$message,'From:'.$from);
?>
*
*
*
Regards,
*Shreyas Agasthya