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

  • SEARCH
  • Home
  • 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 6653553
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:17:04+00:00 2026-05-26T01:17:04+00:00

Hi i am currently implementing an email system for a customer in php. I’m

  • 0

Hi i am currently implementing an email system for a customer in php. I’m having a bit of trouble in figuring out something. Here’s a sample code:

   $mail = new PHPMailer();  // create a new object
   $mail->IsSMTP(); // enable SMTP
   $mail->SMTPDebug = 0;  // debugging: 1 = errors and messages, 2 = messages only
   $mail->SMTPAuth = true;  // authentication enabled
   $mail->SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for Gmail
   $mail->Host = 'smtp.gmail.com';
   $mail->Port = 465;
   $mail->Username = "***missing part***";
   $mail->Password = "***missing part***";
   $mail->SetFrom($from, $from_name);
   $mail->Subject = $subject;
   $mail->Body = $body;
   $mail->AddAddress($to);

My customer already created a business email account on gmail for this website. My question is should i put this business email and password in these missing parts? Anyone could help me please? Thanks.

  • 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-26T01:17:04+00:00Added an answer on May 26, 2026 at 1:17 am

    whose username and password should i put there?

    If you want to use GMail, you need to put in the username and password that belong to the GMail account you want to send the message from.

    …. which is why sending E-Mail through GMail is a bit of an imperfect solution IMO – you put your personal Google login data, with which you can access everything you do on Google, into a script on a server. It’s not great practice security-wise.

    It might be more feasible to create a SMTP account on the client’s web site, and use that. That has the additional advantage that you can use a email@clients-domain-name.com sender address.

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

Sidebar

Related Questions

We are currently implementing MOSS 2007 to replace an older portal system (Plumtree) and
im currently implementing a security module in a voting system and i was wondering
I am currently implementing something similar to an hospital intra site, where doctors can
I'm currently implementing a navigation system for routing through Europe. So far, I have
I am currently implementing a timer/callback system using Don Clugston's fastdelegates. (see http://www.codeproject.com/KB/cpp/FastDelegate.aspx )
I'm currently implementing a raytracer. Since raytracing is extremely computation heavy and since I
I'm currently implementing a JavaScript library that keeps track of the history of changes
I'm currently implementing a very complex tree structure to allow for near-instant data access,
I'm currently implementing a .NET wrapper for a Java library by using JNI to
I'm currently implementing a RESTful API (nothing serious, just for a blog engine i'm

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.