1

How can it be possible to send real life email(from gmail account) using the local server. Also how can it be possible in using the mail() function where we do not provide the password of the user account which is sending the email? Please help. Thanks in advance...

1 Answers1

0

You can use a php mailer class which supports SMTP-Servers to send mails. So you can define googles SMTP-Server with your login credentials and send mails through googles SMTP server. There are a lot of PHP snippets and libs which support this. To name two popular ones:

And you can also configure the mail() function of PHP to use an SMTP-Server for sending e-mails in your php.ini see this answer for details.

Community
  • 1
  • 1
TiMESPLiNTER
  • 5,741
  • 2
  • 28
  • 64