Author Topic: Errors when trying to send email using SMTP  (Read 33622 times)

0 Members and 1 Guest are viewing this topic.

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Errors when trying to send email using SMTP
« on: December 18, 2002, 05:02:30 AM »
Common error messages include:

Quote
Warning: fgets(): supplied argument is not a valid File-Handle resource in /pub/www/user41/htdocs/4images/includes/email.php on line 185
Quote
Email Error: Invalid mail server response (service not ready?):
SMTP (Simple Mail Transfer Protocol) is the most widely used method of sending email from email accounts.  But when it comes to using it from php on a web site, the vast majority of web hosts do not have it enabled. 

Right out of the box, PHP has an email function built into it.  Under UNIX it almost always uses a program called sendmail to do the actual sending.  Only under MS Windows is it possible, perhaps even likely, that php might be configured to use SMTP.  (More info at php.net) Therefore the general recommendation is to turn off SMTP for sending emails unless you know for sure your web site is running on MS Windows and/or you've already tried the method below.

To use php to send email from 4images:
    1.  Login to the admin control panel
    2.  Under "General" click "Settings"
    3.  Fill in "Admin Email" with a working email address.
    4.  Click the "NO" radio button for "Use SMTP server".
    5.  Leave the SMTP server host, username and password fields blank.
    6.  Click "Save Changes" at the bottom of the page.[/list:u]
« Last Edit: March 15, 2005, 01:50:23 AM by Chris »

Offline per4mance

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Errors when trying to send email using SMTP
« Reply #1 on: March 29, 2009, 10:51:27 PM »
Maybe this could be a useful article for you : http://www.4homepages.de/forum/index.php?topic=24504