Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Configuring PHP to send email

New Here ,
Mar 26, 2009 Mar 26, 2009
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.
TOPICS
Server side applications
468
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 26, 2009 Mar 26, 2009
LATEST
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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines