I'm finding to proper information about how to send email from localhost WAMP. And how to get authorize to send email from particular authorize email address to send any other email address.
How to configure this whole step explain me details, I already visit here some Stack Overflow answer as well as blog post but all are very confusing and old dated so it's may be possible to not working. So i need Stack Overflow users help. Thank you.
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.
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 ).
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. You can also change your php.
Configuring a working email client from localhost
is quite a chore, I have spent hours of frustration attempting it. At last I have found this way to send mails (using WAMP, XAMPP, etc.):
Configure this hMailServer setting:
Configure your Gmail account, perform following modification:
If you want to send email from another computer you need to allow deliveries from External to External accounts by following steps:
For me Fake Sendmail works.
What to do:
1) Edit C:\wamp\sendmail\sendmail.ini:
smtp_server=smtp.gmail.com smtp_port=465 [email protected] auth_password=your_password
2) Edit php.ini
and set sendmail_path
sendmail_path = "C:\wamp\sendmail\sendmail.exe -t"
That's it. Now you can test a mail.
Try using fake sendmail to send emails in a WAMP enviroment.
http://jesin.tk/using-sendmail-on-windows/
a) Open the "php.ini". For XAMPP,it is located in C:\XAMPP\php\php.ini. Find out if you are using WAMP or LAMP server. Note : Make a backup of php.ini file
b) Search [mail function] in the php.ini file.
You can find like below.
[mail function]
; For Win32 only.
; http://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
Change the localhost to the smtp server name of your ISP. No need to change the smtp_port. Leave it as 25. Change sendmail_from from postmaster@localhost to your domain email address which will be used as from address..
So for me, it will become like this.
[mail function]
; For Win32 only.
SMTP = smtp.planetghost.com
smtp_port = 25
; For Win32 only.
sendmail_from = [email protected]
auth_username = [email protected]
auth_password = example_password
c) Restart the XAMPP or WAMP(apache server) so that changes will start working.
d) Now try to send the mail using the mail() function ,
mail("[email protected]","Success","Great, Localhost Mail works");
credit
================================================================================
Another way
Gmail servers use SMTP Authentication under SSL. I think that there is no way to use the mail() function under that circumstances, so you might want to check these alternatives:
They both support SMTP auth under SSL.
Credit : Check reference answer here
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