User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 401,475 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,119 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 1331 | Replies: 2 | Solved
Reply
Join Date: Apr 2008
Posts: 4
Reputation: PeterYpenburg is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
PeterYpenburg PeterYpenburg is offline Offline
Newbie Poster

Mail settings in php.ini on Windows

  #1  
Apr 1st, 2008
Hi,

I am developing some PHP code for a client and part of the code must send emails. My development environment is using Eclipse on Windows. I want to test the email functionality from my local machine. I have to set the values in php.ini file but I am not sure how to specify all the settings. I understand that I must use a SMTP server and have one that run on my website which runs on Linux. I can copy all my code there and let that send to my email to test it.

The available settings in my php.ini file is as follows:
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
sendmail_from = webtest@localhost

My question is this: Can I change the settings in the php.ini file to use the smtp server on my website to send the mail from my localhost via the smtp server on my website? If I can do this then how do I specify the username and password in the php.ini that must be used to log into my smtp server and send the mail?

Thank you.
Peter.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Mar 2008
Location: Praha, Czech Republic, Europe
Posts: 89
Reputation: petr.pavel is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 11
petr.pavel's Avatar
petr.pavel petr.pavel is offline Offline
Junior Poster in Training

Re: Mail settings in php.ini on Windows

  #2  
Apr 1st, 2008
Hi Peter,
you could use your webhosting's SMTP server but PHP doesn't support SMTP authentication out of the box. You have two options:
a) Either you will use your Internet provider's SMTP server (your home/work ISP) because then I believe you won't have to use SMTP authentication (authentication is usually done by your IP address)
b) or you will use a library like XPertMailer http://www.xpertmailer.com/ instead of PHP built-in function mail(). Then you will be able to use SMTP authentication and a SMTP server of your choice.

Let me know if you need any more details.
Petr 'PePa' Pavel

The more information you give the more relevant answer you get.
Please consider using "Add to ... Reputation" and mark your thread as Solved if you found what you were looking for. By giving feedback you help others.
Reply With Quote  
Join Date: Apr 2008
Posts: 4
Reputation: PeterYpenburg is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
PeterYpenburg PeterYpenburg is offline Offline
Newbie Poster

Re: Mail settings in php.ini on Windows

  #3  
Apr 2nd, 2008
Hi Petr Pavel,

Thank you for the feedback, I will check out the XPertMailer you suggested.

Peter.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 1:53 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC