4 ms·
Really happy that they are working out for you! PHP has been my world for many years and recently I've begun branching out. After playing around with the likes
by mikegreenberg 15y ago
Really happy that they are working out for you!
PHP has been my world for many years and recently I've begun branching out. After playing around with the likes of Python, Ruby, and NodeJS; they are all just tools that you can use to get the job done.
That said, there are much better tools than others for specific tasks. And I were to suggest a language that you should start learning in regards to web development, I would probably not recommend PHP. The language has hit a bit of a slow trough as they (the PHP gods) decide on an appropriate roadmap going forward. PHP will be around for a long, long time so there's not much worry of it becoming legacy too quickly.
But other languages are much better maintained and have more activity in the community. (My current favorite being Python.)
Regarding your problem at hand, PHP can do this quite simply and the only resource you'll need would be http://php.net/mail/ http://php.net/mail/. That said, I wouldn't use this for high volume traffic as the mail implementation in PHP is not efficient. (Read the notes on that link.)
Email on the internet is a bit tricky, especially when ensuring your message is delivered appropriately, well-formatted, readable in both text and HTML, etc. And as soon as you start hitting these problem, it's a much more efficient use of your time to go with these services over rolling your own.
This is just one person's opinion who ended up using a perl script to handle mailing functionality instead of PHP's native function in a PHP app he wrote. blush
- Random_Person 15y agoExcellent reply sir, might I ask another? The reason I used PHP for my little script was because I discovered that you just ship the output of the form button to whatever.php and it essentially took whatever values as arguments, then quickly spit me back to the site when it was done. I am familiar with Python, and have written some utilities I use daily, but is just as easy to implement Python server side or do I need to install some extensions that handle this sort of stuff?
- mikegreenberg 15y agoI think your solution is perfect for problem. The biggest gripe I have with PHP is the mail interface. When you outgrow your currently solution, the next step I'd take is use your PHP solution to pass the mail request to a mail service provider. That will give you the most bang for your buck without added complexity. If you're feeling really brave and really want to roll your own solution, try to find a way to cheaply create a HTTP POST interface that you could point your form at to process your request. A python/django instance could do this but might be a lot of overhead for just a mail processor, for example. Just don't try to over engineer it. :)