Skip to main content
Participant
March 26, 2009
Question

Configuring PHP to send email

  • March 26, 2009
  • 1 reply
  • 484 views
Hi all,

I'm new to Dreamweaver and php and am working my way through Adobe Dreamweaver CS3 with PHP on a Mac. I've set up a local test server environment using MAMP and I'm on lesson 5. I'm trying to configure PHP to send email and have found the SMTP in the configuration file php.ini but am now stranded as the next part says to enter the internet or IP address of your outgoing mail server. The instructions aren't quite clear to me being new to this, I don't know what to enter and exactly where to enter it in the php.ini file. Can anyone please help.

Many thanks,

Karl.
This topic has been closed for replies.

1 reply

Inspiring
March 26, 2009
Karlosx wrote:
> I'm new to Dreamweaver and php and am working my way through Adobe Dreamweaver
> CS3 with PHP on a Mac. I've set up a local test server environment using MAMP
> and I'm on lesson 5. I'm trying to configure PHP to send email and have found
> the SMTP in the configuration file php.ini

Forget about trying to configure mail or SMTP in a local testing
environment. The PHP mail() function is designed to work with a local
mail transport agent. Attempting to send mail to your ISP's SMTP address
will almost certainly result in the mail being rejected, because mail()
doesn't support SMTP authentication.

Create the script on your local computer, but comment out the line that
actually sends the mail. Replace it with echo 'Mail sent';. Once you
have got the script working fine locally, delete the 'Mail sent' message
and replace it with the line that sends the mail. Upload to your remote
server, and test there.

--
David Powers
Adobe Community Expert, Dreamweaver
http://foundationphp.com