•
•
•
•
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
![]() |
•
•
Join Date: Apr 2008
Posts: 4
Reputation:
Rep Power: 0
Solved Threads: 0
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:
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.
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.
•
•
Join Date: Mar 2008
Location: Praha, Czech Republic, Europe
Posts: 89
Reputation:
Rep Power: 1
Solved Threads: 11
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.
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.
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.
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
apple browser cd command prompt computer crack daniweb dell development download emai security google install internet itunes leopard linux mac mail malware merger microsoft mobile news open operating os phishing photo php pirate qmail safari security server smtp software source sp1 system ubuntu unix upgrade vista web windows windows update windows vista xp yahoo
- Microsoft Visual C++ Runtime Library C:\WINDOWS\explorer.exe (Windows NT / 2000 / XP / 2003)
- please help me remove winfix. here is my log file from Hijack this (Viruses, Spyware and other Nasties)
- I want this $%^& off my comp, someone please help! (Viruses, Spyware and other Nasties)
- Browser Windows Keep Opening and Won´t Stop (HT Log included) (Viruses, Spyware and other Nasties)
- SpySheriff and aboutblank (Viruses, Spyware and other Nasties)
- aurora blah blah aurora blah blah (Viruses, Spyware and other Nasties)
- This ought to be simple - extra spaces (PHP)
- rundll32.exe problems (Windows NT / 2000 / XP / 2003)
- Problem's checking e-mail (Viruses, Spyware and other Nasties)
Other Threads in the PHP Forum
- Previous Thread: online music application
- Next Thread: Prase error..Pls help.. simple script..


Linear Mode