These answers are provided by our Community. If you find them useful, show some love sầu by clicking the heart. If you run into issues leave sầu a phản hồi, or add your own answer lớn help others.×
You can type !ref in this text area to quickly tìm kiếm our full mix of tutorials, documentation & marketplace offerings & insert the link!
Indeed, the steps I took were1) If sendmail isn"t installed, install it: apt-get install sendmail2) Configure hosts file correctly: nano /etc/hostsAnd make sure the line looks like this: 127.0.0.1 localhost localhost.localtên miền yourhostnamehere3) Run the sendmail config và answer "Y" to everything: sendmailconfigI restarted apabít for good measure: service apache2 restartAfter that my mail was sending instantly.
Bạn đang xem: How to sendmail in php?
collinpatrickhenderson Thanks for your post, I followed it sort of..Note: On Digital Ocean Ubuntu 14.04 LAMPhường image.
1) ran $ sendmail myemail
yahoo.com This told me sendmail could be found in the following packages:
I decided lớn install the sendmail-bin. I believe this is all that is needed. For sending mail from form etc.
2) $ subởi vì apt-get install sendmail-bin
Then checked hosts tệp tin.3) $ nano /etc/hostsLooked like:127.0.1.1 myhostname myhostname127.0.0.1 localhost4) control+x lớn quit nano
Then ran:5) $ suvì chưng sendmailconfig
Accepted Y khổng lồ all choices. I think there was three or four..Once finished..
Xem thêm: Học Cách Cắm Hoa Hình Trái Tim Độc Đáo Đầy Lãng Mạn, Cắm Hoa Để Bàn Đơn Giản
Tested again with:6) $ sendmail myemail
It worked nicely. Only thing now is I wonder how much more should be configured for security and performance, I did see a lot in that configuration.. Someone should vì a tutorial on sendmail configuration???
melanie March 31, 2013
canartuc December 5, 2013
Why don"t you use this way: https://www.darkedeneurope.com/community/articles/how-to-use-gmail-or-yahoo-with-php-mail-function . This is excellent tutorial & I have never got problem with it. I am using Gmail as SMTPhường server và everything is both super fast và reliable.
How To Use Gmail or Yahoo with PHP mail() Function
by Jesin A
Read through this tutorial lớn learn how to use Gmail or Yahoo with PHP mail() function.
info1 August 26, 2012
Thank you api2 i"ve tryed that, but it"s not working has is, so for others, here is the hole walkthroughlog has root or use sudoapt-get install php-pearpear install mailpear install Net_SMTPpear install Auth_SASLpear install mail_mimeapt-get install postfixyou should get a install dialog ensure that the Internet site is selected và the Mail hệ thống name is localhostvi /etc/php5/apache2/php.ini set sendmail path to lớn /usr/sbin/sendmail -t -iReboot apabịt gracefully apachectl gracefulNow you"re all done !
moisey August 22, 2012
Hi Jonathan,Sorry I don"t speak French, any chance you could convert that to english?Also kiểm tra the functionality of your basic mail delivery from the command line:# sendmail user
domain.com Body of Test MessageIf that mail gets delivered then we know its not a systems problem but an issue with how it"s interacting with Wordpress/PHP.Thanks
info1 August 23, 2012
Hi Raiyu, Here is the error I received on my terminal when I try sendmail info
jonathanlafleur.ca -bash: sendmail: command not foundFor the french message, it"s already translated right after the french part, The message can"t been sent. Possible reason : your host has maybe deactivated mail() functionLike i"ve asked, I would know if there"s possible lớn explain me how lớn install a mail service, don"t need khổng lồ be "real" tin nhắn, but just to enable the system khổng lồ send me some information via e-mail when needed.Thank you !
api2 August 23, 2012
Hey Jonathan,It sounds lượt thích your VPS is missing an SMTPhường. service to deliver gmail. You can install sendmail which should enable these features for you.yum install sendmail (CentOS)apt-get install sendmail (Ubuntu)Verify that your mail VPS is now online by sshing inlớn your server and running:telnet localhost 25If that works mail should be enabled on your VPS.
info1 August 28, 2012
if you receive sầu : postdrop: warning: unable to look up public/pickup: No such tệp tin or directory.That mean that sendmail was previously installed & that messing things up. So vị the following :mkfifo /var/spool/postfix/public/pickupps aux | grep sendmailkill service postfix restart
besturdughazals January 1, 2013
Have sầu you tried WP SMTPhường plugin? It worked for me.
Xem thêm: Download Phần Mềm Pqs Của Kiểm Dịch Thực Vật, Phần Mềm Pqs
libripens January 29, 2013
I"m about to lớn quit darkedeneurope.com. The instructions on Postfix don"t work. Sendmail takes too long khổng lồ process a simple form. And I"m tired of trying everything I find to lớn make the stupid php mail( ) function work.
Previous 1 2 Next
Load More Answers
Looking for something else?
Ask a new question Search for more help
Get our biweekly newsletter
Sign up for Infrastructure as a Newsletter.
Hollie's Hub for Good
Working on improving health and education, reducing ineunique, và spurring economic growth? We'd lượt thích lớn help.
Become a contributor
You get paid; we donate lớn tech nonprofits.Featured on Community Kubernetes Course Learn Pykhiêm tốn 3 Machine Learning in Pybé nhỏ Getting started with Go Intro lớn Kubernetes darkedeneurope.com Products Virtual Machines Managed Databases Managed Kubernetes Block Storage Object Storage Marketplace VPC Load Balancers
Welcome khổng lồ the developer cloud
darkedeneurope.com makes it simple khổng lồ launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.Learn More
× Join the Community
Before you can vì that To complete this action, sign in to your Community tài khoản or create a new one.
Sign In Sign Up
Community Products Customers