Quick way – Configure XAMPP To Send Mail Through Localhost 2019?
Succeed With CONFIGURE XAMPP TO SEND MAIL THROUGH LOCALHOST 2019 In 5 MINUTES?
As we all know that sending mail in xampp through localhost can be much more painful if we don’t know to configure xampp to send mail through localhost.
Then I thought it will be helpful to all if I can provide them with an easy solution. After spending my quality time on research finally, I came up with a solution which I am disclosing here.
Xampp is the local best server for PHP, Perl, and MySQL.XAMPP helps to create and develop your own applications using Web services technologies. Many people know from their own experience that it. Easy to use control panel. Let’s come to the point of xampp setup to send mail through localhost.
Here are the steps :
Set SMTP host and port in php.ini Set sendmail_path = "{path to xampp}\sendmail\sendmail.exe\" -t" in php.ini In sendmail.ini under sendmail folder in xampp, set smtp_server to what you have set in php.ini smtp_port smtp_ssl auth_username auth_password force_sender hostname Simply call the mail function with all the arguments properly passed
Step 1 :
Let’s write the PHP code in our editor can be Notepad++, PhpStrom, Sublime Text
The PHP code is shown in below:
Step 2:
we can send mail from localhost with sendmail package, Sendmail package is in build 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.ini for Gmail to send mail.
In C:\xampp\php\php.ini find extension=php_openssl.dll and remove the semicolon from the beginning of that line to make SSL working for Gmail for localhost.
Step 3:
in php.ini file find [mail function] and change
SMTP= smtp.gmail.com smtp_port=587 sendmail_from = my-gmail-id@gmail.com sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"
Now Open C:\xampp\sendmail\sendmail.ini. Replace all the existing code in sendmail.ini with following code
Step 4:
[sendmail]
smtp_server=smtp.gmail.com smtp_port=587 error_logfile=error.log debug_logfile=debug.log auth_username=my-gmail-id@gmail.com auth_password=my-gmail-password force_sender=my-gmail-id@gmail.com Now you have done!! create php file with mail function and send mail from localhost.
Note: don’t forget to replace my-Gmail-id and my-Gmail-password in above code.
Also, don’t forget to remove duplicate keys if you copied settings from above.
For example comment following line if there is another sendmail_path: sendmail_path=”C:\xampp\mailtodisk\mailtodisk.exe” in the php.ini file
Remember not to forget to restart xampp control panel so the changes take effect.
Click below links for the video tutorial :
Mail through localhost php
Mail through local host php 2018— Updated
Follows the second method if the first method does not work for you :
You have to configure SMTP on your server
You can use the googles free SMTP server Pretty easy to set up too.
-
<?php
-
$mail = new PHPMailer(true);
-
//Send mail using gmail
-
if($send_using_gmail){
-
$mail->IsSMTP(); // telling the class to use SMTP
-
$mail->SMTPAuth = true; // enable SMTP authentication
-
$mail->SMTPSecure = "ssl"; // sets the prefix to the servier
-
$mail->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server
-
$mail->Port = 465; // set the SMTP port for the GMAIL server
-
$mail->Username = "your-gmail-account@gmail.com"; // GMAIL username
-
$mail->Password = "your-gmail-password"; // GMAIL password
-
}
-
-
//Typical mail data
-
$mail->AddAddress($email, $name);
-
$mail->SetFrom($email_from, $name_from);
-
$mail->Subject = "My Subject";
-
$mail->Body = "Mail contents";
-
try{
-
$mail->Send();
-
echo "Success!";
-
} catch(Exception $e){
-
//Something went bad
-
echo "Fail :(";
-
}
-
-
?>
Thanks for your precious comment ,hope it means a lot..
Thanks for encouraging comment..
Thanks for encouraging comment..
Leia todas as dados que separamos para você! http://bonecasdepanobygisele.blogspot.Com.br/2012/12/retrospectiva-dietas-2012-dieta-da.html
Only wanna comment that you have a very nice internet site, I like the pattern it really stands out.
you’re in point of fact a just right webmaster. The
site loading speed is incredible. It kind of feels that you are doing any distinctive
trick. Furthermore, The contents are masterwork.
you have done a great task on this matter!
Wow! Excellent blog post! I adore the method described How to configure xampp to send mail through localhost in php 2018?. Many thanks until this well-arranged guide with reference to How to configure xampp to send mail through localhost in php 2018?! This is what I became trying to find. You can’t say everyone should certainly generate as effective as the article author from the page. A lot of people have difficulties containing freelance writing . Thinking of doing this, I’ve couldn’t anticipate how to target the hassle without online business Thomas. In-depth overviews of the largest around the writing… Read more »
Обязательно к просмотру! Только работает Magnet Lashes. http://sale2017.magnetlashes.mobi/ Чем хорош Magnet Lashes? MAGNET LASHES VS ОБЫЧНЫЕ НАКЛАДНЫЕ РЕСНИЦЫ – без утомительного наклеивания – гипоаллергенные – без неприятного клея – не раздражают глаза MAGNET LASHES VS ПРИМАНКА РЕСНИЦЫ С ТУШЬЮ – закрепляются намного быстрее, чем наносится тушь – смотрятся несравненно объемнее и много эффектно – не должен круг погода тереть глаза при демакияже магнитные ресницы VS НАРАЩИВАНИЕ В САЛОНЕ – существенно дешевле – смотрятся также – не облетают и не оставляют некрасивые прогалины – в любой момент дозволительно снять – трите глаза и спите лицом в подушку – не портят свои… Read more »
Обязательно к просмотру! Подобно работает Magnet Lashes. http://sale2017.magnetlashes.mobi/ Чем хорош Magnet Lashes? MAGNET LASHES VS ОБЫЧНЫЕ НАКЛАДНЫЕ РЕСНИЦЫ – без утомительного наклеивания – гипоаллергенные – без неприятного клея – не раздражают глаза MAGNET LASHES VS ПРИМАНКА РЕСНИЦЫ С ТУШЬЮ – закрепляются намного быстрее, чем наносится тушь – смотрятся значительно объемнее и много эффектно – не надобно круг погода тереть глаза быть демакияже магнитные ресницы VS НАРАЩИВАНИЕ В САЛОНЕ – существенно дешевле – смотрятся также – не облетают и не оставляют некрасивые прогалины – в всякий момент дозволено снять – трите глаза и спите лицом в подушку – не портят свои… Read more »
Обязательно к просмотру! Подобно работает Magnet Lashes. http://sale2017.magnetlashes.mobi/ Чем хорош Magnet Lashes? MAGNET LASHES VS ОБЫЧНЫЕ НАКЛАДНЫЕ РЕСНИЦЫ – без утомительного наклеивания – гипоаллергенные – без неприятного клея – не раздражают глаза MAGNET LASHES VS ПРИМАНКА РЕСНИЦЫ С ТУШЬЮ – закрепляются намного быстрее, чем наносится тушь – смотрятся много объемнее и весьма эффектно – не должен круг погода тереть глаза при демакияже MAGNET LASHES VS НАРАЩИВАНИЕ В САЛОНЕ – существенно дешевле – смотрятся также – не облетают и не оставляют некрасивые прогалины – в любой момент можно снять – трите глаза и спите лицом в подушку – не портят приманка… Read more »
Микрозайм на карту украины
Кредит онлайн на карту от 20 лет
Моментальный кредит на карту киев
Восточный экспресс банк микрокредит
Микрокредиты на карту срочно
Микрозайм заявка онлайн
Быстро деньги онлайн заявка
Good day! Terrific content! I really like which you represented How to configure xampp to send mail through localhost in php 2018?. Amazing page and as well as incredible articles! No doubt that your particular owner is undoubtedly professional is definitely a fabulous knowledge in re-writing. I wish My partner and i certain quality writing skills. I’m a student but i require to construct many newspapers repeatedly . There is certainly best ways to get rid of this matter. Ought to you to learn more bit.ly there is also a site complete with finely detailed records of internet paper marketing… Read more »
Individuals school repeatedly discussion about How to
configure xampp to send mail through localhost in php 2018?, nonetheless i don’t
know I just completely figure out it should be. I require a tutor, or just a good idea to believe a real coach that are able to present me personally with a lot more insight.
Might you?
It’s a good mouse, works quite well. I know I bought it coz the dimensions said it was a normal sized mouse but ever since I bought another smaller sized one, I find this one bigger and uncomfortable, so that’s why the 4 stars. However, given the price range and the brand value, I’d say it works just fine. So, go for it!
really nice article,love you man
Hi everyone, it’s my firѕt pay а visit at thіs
site, and paragraph is reɑlly fruitful fօr me,
kep uup posting tһese content.
Know your content advertising and marketing viewers.
I do not even know how I finished up right here, however I thought this put up was once good.
I do not know who you are however definitely you are going to a well-known blogger in the event you are not already.
Cheers!
It’s wonderful that you are getting thoughts from this article as well as from our
dialogue made here.
Empreendedorismo: Transformando convicções em negócios. https://gruesomeneedforadventure.tumblr.com
I have been surfing online more than three hours today, yet I never found
any interesting article like yours. It’s pretty worth enough for me.
In my opinion, if all web owners and bloggers made good
content as you did, the web will be much more useful than ever before.
Ꮋi therе, I ԁo think your site ϲould bе һaving wweb browser compatibility problеms.
When І takе a lo᧐k at your site in Safari, it looks fine howeνer whsn opening in Internet Explorer, it’sgot ѕome overlapping issues.
I jᥙst wanted to provide yοu with a quick heads uρ!
Besides thɑt, excellent website!
I did all the steps, but it did not work. Can you help me!
Thank you a lot for sharing this with all folks you
really realize what you are speaking about! Bookmarked. Please also
visit my website =). We could have a link alternate
arrangement among us
Amazing blog! Do you have any recommendations for aspiring writers?
I’m hoping to start my own site soon but I’m a little lost on everything.
Would you recommend starting with a free platform like WordPress or go for a paid option? There are so
many choices out there that I’m totally confused .. Any suggestions?
Appreciate it!
how can i make the fuction mail inside php can you guide me
I will immediately snatch your rss as I can’t find your e-mail subscription link or newsletter service. Do you’ve any? Please permit me recognize in order that I may subscribe. Thanks.
Thanks for your precious comment ,hope it means a lot..
Thanks for encouraging comment..
Thanks for encouraging comment..
Leia todas as dados que separamos para você! http://bonecasdepanobygisele.blogspot.Com.br/2012/12/retrospectiva-dietas-2012-dieta-da.html
Only wanna comment that you have a very nice internet site, I like the pattern it really stands out.
you’re in point of fact a just right webmaster. The
site loading speed is incredible. It kind of feels that you are doing any distinctive
trick. Furthermore, The contents are masterwork.
you have done a great task on this matter!
Wow! Excellent blog post! I adore the method described How to configure xampp to send mail through localhost in php 2018?. Many thanks until this well-arranged guide with reference to How to configure xampp to send mail through localhost in php 2018?! This is what I became trying to find. You can’t say everyone should certainly generate as effective as the article author from the page. A lot of people have difficulties containing freelance writing . Thinking of doing this, I’ve couldn’t anticipate how to target the hassle without online business Thomas. In-depth overviews of the largest around the writing… Read more »
Обязательно к просмотру! Только работает Magnet Lashes. http://sale2017.magnetlashes.mobi/ Чем хорош Magnet Lashes? MAGNET LASHES VS ОБЫЧНЫЕ НАКЛАДНЫЕ РЕСНИЦЫ – без утомительного наклеивания – гипоаллергенные – без неприятного клея – не раздражают глаза MAGNET LASHES VS ПРИМАНКА РЕСНИЦЫ С ТУШЬЮ – закрепляются намного быстрее, чем наносится тушь – смотрятся несравненно объемнее и много эффектно – не должен круг погода тереть глаза при демакияже магнитные ресницы VS НАРАЩИВАНИЕ В САЛОНЕ – существенно дешевле – смотрятся также – не облетают и не оставляют некрасивые прогалины – в любой момент дозволительно снять – трите глаза и спите лицом в подушку – не портят свои… Read more »
Обязательно к просмотру! Подобно работает Magnet Lashes. http://sale2017.magnetlashes.mobi/ Чем хорош Magnet Lashes? MAGNET LASHES VS ОБЫЧНЫЕ НАКЛАДНЫЕ РЕСНИЦЫ – без утомительного наклеивания – гипоаллергенные – без неприятного клея – не раздражают глаза MAGNET LASHES VS ПРИМАНКА РЕСНИЦЫ С ТУШЬЮ – закрепляются намного быстрее, чем наносится тушь – смотрятся значительно объемнее и много эффектно – не надобно круг погода тереть глаза быть демакияже магнитные ресницы VS НАРАЩИВАНИЕ В САЛОНЕ – существенно дешевле – смотрятся также – не облетают и не оставляют некрасивые прогалины – в всякий момент дозволено снять – трите глаза и спите лицом в подушку – не портят свои… Read more »
Обязательно к просмотру! Подобно работает Magnet Lashes. http://sale2017.magnetlashes.mobi/ Чем хорош Magnet Lashes? MAGNET LASHES VS ОБЫЧНЫЕ НАКЛАДНЫЕ РЕСНИЦЫ – без утомительного наклеивания – гипоаллергенные – без неприятного клея – не раздражают глаза MAGNET LASHES VS ПРИМАНКА РЕСНИЦЫ С ТУШЬЮ – закрепляются намного быстрее, чем наносится тушь – смотрятся много объемнее и весьма эффектно – не должен круг погода тереть глаза при демакияже MAGNET LASHES VS НАРАЩИВАНИЕ В САЛОНЕ – существенно дешевле – смотрятся также – не облетают и не оставляют некрасивые прогалины – в любой момент можно снять – трите глаза и спите лицом в подушку – не портят приманка… Read more »
Микрозайм на карту украины
Кредит онлайн на карту от 20 лет
Моментальный кредит на карту киев
Восточный экспресс банк микрокредит
Микрокредиты на карту срочно
Микрозайм заявка онлайн
Быстро деньги онлайн заявка
Good day! Terrific content! I really like which you represented How to configure xampp to send mail through localhost in php 2018?. Amazing page and as well as incredible articles! No doubt that your particular owner is undoubtedly professional is definitely a fabulous knowledge in re-writing. I wish My partner and i certain quality writing skills. I’m a student but i require to construct many newspapers repeatedly . There is certainly best ways to get rid of this matter. Ought to you to learn more bit.ly there is also a site complete with finely detailed records of internet paper marketing… Read more »
Individuals school repeatedly discussion about How to
configure xampp to send mail through localhost in php 2018?, nonetheless i don’t
know I just completely figure out it should be. I require a tutor, or just a good idea to believe a real coach that are able to present me personally with a lot more insight.
Might you?
It’s a good mouse, works quite well. I know I bought it coz the dimensions said it was a normal sized mouse but ever since I bought another smaller sized one, I find this one bigger and uncomfortable, so that’s why the 4 stars. However, given the price range and the brand value, I’d say it works just fine. So, go for it!
really nice article,love you man
Hi everyone, it’s my firѕt pay а visit at thіs
site, and paragraph is reɑlly fruitful fօr me,
kep uup posting tһese content.
Know your content advertising and marketing viewers.
I do not even know how I finished up right here, however I thought this put up was once good.
I do not know who you are however definitely you are going to a well-known blogger in the event you are not already.
Cheers!
It’s wonderful that you are getting thoughts from this article as well as from our
dialogue made here.
Empreendedorismo: Transformando convicções em negócios. https://gruesomeneedforadventure.tumblr.com
I have been surfing online more than three hours today, yet I never found
any interesting article like yours. It’s pretty worth enough for me.
In my opinion, if all web owners and bloggers made good
content as you did, the web will be much more useful than ever before.
Ꮋi therе, I ԁo think your site ϲould bе һaving wweb browser compatibility problеms.
When І takе a lo᧐k at your site in Safari, it looks fine howeνer whsn opening in Internet Explorer, it’sgot ѕome overlapping issues.
I jᥙst wanted to provide yοu with a quick heads uρ!
Besides thɑt, excellent website!
I did all the steps, but it did not work. Can you help me!