Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 214945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T18:25:22+00:00 2026-05-11T18:25:22+00:00

I am using XAMPP on a localhost windows VISTA m/c…using gmail as smpt server

  • 0

I am using XAMPP on a localhost windows VISTA m/c…using gmail as smpt server

I am trying to send an email using simple PHP script

here is the configuration details on sendmail.ini (I have the sendmail.exe and the other 2 dll in that directory)

smtp_server=smtp.gmail.com
; smtp port (normally 25)

smtp_port=465

; the default domain for this server will be read from the registry
; this will be appended to email addresses when one isn't provided
; if you want to override the value in the registry, uncomment and modify

default_domain=localhost

; log smtp errors to error.log (defaults to same directory as sendmail.exe)
; uncomment to enable logging

error_logfile=error.log

; create debug log as debug.log (defaults to same directory as sendmail.exe)
; uncomment to enable debugging

debug_logfile=debug.log

; if your smtp server requires authentication, modify the following two lines

auth_username=xxxxxxx
auth_password=xxxxxx

hostname=localhost

and I have changed the php.ini

[mail function]
; For Win32 only.
;SMTP = localhost
;smtp_port = 25

; For Win32 only.
;sendmail_from = xxxxx

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
sendmail_path = "C:\xampp\sendmail\sendmail.exe -t"

and Once I call the script it goes into waiting…for localhost…
here is the debug.log…

09/05/02 17:34:41 ** — MESSAGE BEGIN —
09/05/02 17:34:41 ** To: xxx@yahoo.com
09/05/02 17:34:41 ** Subject: Form Submission Results
09/05/02 17:34:41 ** From: My Web Site
09/05/02 17:34:41 ** Reply-To: xxx@gmail.com
09/05/02 17:34:41 **
09/05/02 17:34:41 ** Name: xxx
09/05/02 17:34:41 ** E-Mail: xxx@yahoo.com
09/05/02 17:34:41 ** Message: hey test message
09/05/02 17:34:41 **
09/05/02 17:34:41 **
09/05/02 17:34:41 ** — MESSAGE END —
09/05/02 17:34:41 ** Connecting to smtp.gmail.com:465
09/05/02 17:34:41 ** Connected.

I am new to PHP and would like to know if there is a better way to do mail…I am not in for HTML/multipart mails with attachment now…
Also i should be able to test in localhost without SMTP server installed . I would like to use GMAIL for now testing.
THnks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T18:25:23+00:00Added an answer on May 11, 2026 at 6:25 pm

    I strongly suggest you use a library e.g. PHPMailer. Here is their gmail example.

    Another good library (which I haven’t used) is SwiftMailer. Here is their gmail example.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 98k
  • Answers 98k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer It compares both value and type equality. if("45" === 45)… May 11, 2026 at 7:36 pm
  • Editorial Team
    Editorial Team added an answer It depends on what version of EF you are using… May 11, 2026 at 7:36 pm
  • Editorial Team
    Editorial Team added an answer Agreed - you didn't specifiy framewrok version - web or… May 11, 2026 at 7:36 pm

Related Questions

I can't seem to connect to mysql with a php script, even though I
I need to access a mysql database from c# code but I would prefer
I am using xampp on Windows, but I would like to use something closer
I am using the gethostbyname() function in the usual manner... iaHost.s_addr = inet_addr(lpServerName); if
I have an Ubuntu Server (with all of LAMP and Subversion installed). I use

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.