RE: [PHP-WIN] RE: mail function

From: Date: Mon, 28 Aug 2000 13:59:27 +0000
Subject: RE: [PHP-WIN] RE: mail function
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-2213@lists.php.net to get a copy of this message
Yes I thought the same and it's more reliable because it doesn't matter if your Internet link is down as your local SMTP server will accept the email and forward it once the link is back up. Unfortunately I don't yet have a local SMTP server! LOL James -----Original Message----- From: Jeroen ten Berge [mailto:j.ten.berge@getexo.nl] Sent: 28 August 2000 14:51 To: James Duncan; Sreekumar; php-windows@lists.php.net Subject: RE: [PHP-WIN] RE: mail function Another idee is to use the SMTP server in your network, is faster too ! -----Original Message----- From: James Duncan [mailto:jd@jamesduncan.co.uk] Sent: Monday, August 28, 2000 14:22 To: Sreekumar; php-windows@lists.php.net Subject: [PHP-WIN] RE: mail function Hi there, I'm new to PHP and I had the same kind of problems with mailto() and yes I'm going through a proxy server and firewall. To test your code for correct functionality connect directly to the Internet from your development machine via modem. This removes the proxy server from the equation. Launch your normal email client (Outlook, etc) and ensure you can send and receive email. If this works then your email settings are correct. Next make sure your SMTP setting in PHP.INI is the same as in your email client. Then try your PHP code. An email should be generated and sent without errors. If this is the case then it means there is a problem between your PHP code and Proxy server. This was my case and I had to change my proxy/firewall settings. Originally I was getting the same error message as you but I changed (lowered) my security settings and established a "Transparent Proxy" and now the same code works just fine. I'm running WinProxy 3 on a Win 95 machine as my proxy/firewall. Here is the PHP code I use: $to = "$toname <$toemail>"; $from = "$fromname <$fromemail>"; $subject = "Your Subject"; $message = "Your Message"; mail($to, "$subject", $message, "From: $from"); Hope this helps James -----Original Message----- From: Sreekumar [mailto:sreekumarp@yahoo.com] Sent: 28 August 2000 07:28 To: php-windows@lists.php.net Subject: mail function Hi, I am using PHP4 under 1. Windows'98,Personnel web server for windows 2. Windows NT 4 and IIS4 When i used the mail function ~~~~~~~~~ mail("sreekumarp@yahoo.com","subject","body","sreekumarp@yahoo.com"); ~~~~~~~~~ It shows an error ~~~~~~~~~ Warning: Failed to Connect in C:\phpprojects\echo.php on line 3 ~~~~~~~~~ Why is this so, i have changed the mail section in PHP.ini [mail function] SMTP = smtp.mail.yahoo.com ;for win32 only sendmail_from = sreekumarp@yahoo.com ;for win32 only Can any one help me for the above. 2. How can one test MAIL function while internet access is through a web proxy Thank you in advance Sreekumar __________________________________________________ Do You Yahoo!? Yahoo! Mail - Free email you can access from anywhere! http://mail.yahoo.com/ -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net For additional commands, e-mail: php-windows-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.windows (#2213) next »