I'm learning PHP and have installed XAMPP on my computer.
But I have a problem with the setup as the email option doesn't seem to be working.
After doing some reading I think it has something to do with the below, found on my server in the php.ini file
[mail function] ; For Win32 only. ; *hp://*php.net/smtp SMTP = localhost ; http://php.net/smtp-port smtp_port = 25 ; For Win32 only. ; http://php.net/sendmail-from ;sendmail_from = postmaster@localhost
Is there anything I need to change? I have seen software such as swiftmailer mentioned but I don't know if XAMPP has this included already?
You can send mail from localhost with sendmail package , sendmail package is inbuild in XAMPP. So if you are using XAMPP then you can easily send mail from localhost. For example, you can configure C:\xampp\php\php. ini and c:\xampp\sendmail\sendmail.
If you want to send emails from localhost directly, you need to install a Mail Transport Agent (MTA), or if you like, a SMTP service. IIS provides one. You can otherwise find some others on Google.
Send Email from Localhost with PHPSet SMTP credentials (host, username, password, and port). Specify sender name and email ( $mail->setFrom ). Set recipient email address ( $mail->addAddress ). Set email subject ( $mail->Subject ).
Laravel provides drivers for SMTP, Mailgun, Mandrill, SparkPost, Amazon SES, PHP's mail function, and sendmail , allowing you to quickly get started sending mail through a local or cloud based service of your choice.
My favorite smtp server is hMailServer.
It has a nice windows friendly installer and wizard. Hands down the easiest mail server I've ever setup.
It can proxy through your gmail/yahoo/etc account or send email directly.
Once it is installed, email in xampp just works with no config changes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With