PHPMailer authentication error

PHPMailer authentication error

Hello,

I'm setting up PHP Mailer to send emails from my website's form,  but I'm receiving an authentication error.
I also tried creating an APP password for this account, but still not working.

The username /password are the same used to login into my dashboard.

Here is the code I'm using:
    $mail->isSMTP();
    $mail->Host = 'smtppro.zoho.com';
    $mail->SMTPSecure = 'ssl';
    $mail->Port='465';  
    $mail->SMTPAuth=true;
    $mail->Username="myusername@domain.com";
    $mail->Password="##REMOVED##"; //APP Password
    $mail->SMTPOptions = array('ssl' => array('verify_peer' => false,'verify_peer_name' => false,'allow_self_signed' => true));
    $mail->setFrom('contact@mywebsite.com', 'My Name);
    $mail->addAddress("customeremail@email.com", "Cust Name");     // Add a recipient

    $mail->isHTML(true); 
    $mail->Subject = "Website Form";
    $mail->Body    = "Message goes here...";
    $mail->AltBody = 'You need a HTML email client to see this message';
    $mail->send();

And this is the log:

2023-12-21 18:13:28 Connection: opened

2023-12-21 18:13:28 SMTP INBOUND: "220-mi3-ss120.a2hosting.com ESMTP Exim 4.96.2 #2 Thu, 21 Dec 2023 13:13:28 -0500"

2023-12-21 18:13:28 SMTP INBOUND: "220-We do not authorize the use of this system to transport unsolicited,"

2023-12-21 18:13:28 SMTP INBOUND: "220 and/or bulk e-mail."

2023-12-21 18:13:28 SERVER -> CLIENT: 220-mi3-ss120.a2hosting.com ESMTP Exim 4.96.2 #2 Thu, 21 Dec 2023 13:13:28 -0500 

                                     220-We do not authorize the use of this system to transport unsolicited, 

                                     220 and/or bulk e-mail.

2023-12-21 18:13:28 CLIENT -> SERVER: EHLO mi3-ss120.a2hosting.com

2023-12-21 18:13:28 SMTP INBOUND: "250-mi3-ss120.a2hosting.com Hello mi3-ss120.a2hosting.com [66.198.240.49]"

2023-12-21 18:13:28 SMTP INBOUND: "250-SIZE 78643200"

2023-12-21 18:13:28 SMTP INBOUND: "250-8BITMIME"

2023-12-21 18:13:28 SMTP INBOUND: "250-PIPELINING"

2023-12-21 18:13:28 SMTP INBOUND: "250-PIPECONNECT"

2023-12-21 18:13:28 SMTP INBOUND: "250-AUTH PLAIN LOGIN"

2023-12-21 18:13:28 SMTP INBOUND: "250 HELP"

2023-12-21 18:13:28 SERVER -> CLIENT: 250-mi3-ss120.a2hosting.com Hello mi3-ss120.a2hosting.com [66.198.240.49]

                                     250-SIZE 78643200

                                     250-8BITMIME

                                     250-PIPELINING

                                     250-PIPECONNECT

                                     250-AUTH PLAIN LOGIN

                                     250 HELP

2023-12-21 18:13:28 Auth method requested: UNSPECIFIED

2023-12-21 18:13:28 Auth methods available on the server: PLAIN,LOGIN

2023-12-21 18:13:28 Requested auth method not available:

2023-12-21 18:13:28 Auth method selected: LOGIN

2023-12-21 18:13:28 CLIENT -> SERVER: AUTH LOGIN

2023-12-21 18:13:28 SMTP INBOUND: "334 VXNlcm5hbWU6"

2023-12-21 18:13:28 SERVER -> CLIENT: 334 VXNlcm5hbWU6

2023-12-21 18:13:28 CLIENT -> SERVER: c29zQHRoZXJhaWRzcGVjaWFsaXN0LmNvbQ==

2023-12-21 18:13:28 SMTP INBOUND: "334 UGFzc3dvcmQ6"

2023-12-21 18:13:28 SERVER -> CLIENT: 334 UGFzc3dvcmQ6

2023-12-21 18:13:28 CLIENT -> SERVER: OVkwUHVTSlpXbWFD

2023-12-21 18:13:30 SMTP INBOUND: "535 Incorrect authentication data"

2023-12-21 18:13:30 SERVER -> CLIENT: 535 Incorrect authentication data

2023-12-21 18:13:30 SMTP ERROR: Password command failed: 535 Incorrect authentication data

2023-12-21 18:13:30 SMTP Error: Could not authenticate.

2023-12-21 18:13:30 CLIENT -> SERVER: QUIT

2023-12-21 18:13:30 SMTP INBOUND: "221 mi3-ss120.a2hosting.com closing connection"

2023-12-21 18:13:30 SERVER -> CLIENT: 221 mi3-ss120.a2hosting.com closing connection

2023-12-21 18:13:30 Connection: closed

2023-12-21 18:13:30 SMTP Error: Could not authenticate.


Any idea on what is going on?
    • Sticky Posts

    • Pocket from Mozilla is closing shop. Don’t lose your favorites . Move them to Zoho Mail Bookmarks now! 📥🔖

      The end of Pocket shouldn't mean the end of your important links and content. Easily import them into Zoho Mail's Bookmarks and continue right where you left off. You can bring over your entire Saves, Collections, and tags just the way they are. Bookmarks
    • Zoho Mail POP & IMAP Server Details

      Hello all! We have been receiving a number of requests regarding the errors while configuring or using Zoho Mail account in POP/ IMAP clients. The server details vary based on your account type and the Datacenter in which your account is setup. Ensure
    • Workplace - Zoholics Europe Customer Awards

      Dear Zoho Mail Community! 📣 We're excited to announce that at this year's Zoholics events across Europe, we're holding customer awards for the first time ever! Workplace - Zoholics Europe Customer Awards This is your chance to shout about the amazing
    • Important update on Group Management | Zoho Mail

      Dear Zoho Mail Community, This post is to inform you all of the following updates on the Group Management in Zoho Mail. Group Member Addition: If a group member is added to an organization group in a Zoho Application, the member will be automatically
    • Mastering email etiquette and best practices to follow in Zoho Mail

      Hello Zoho Mail Community, We’re thrilled to invite you all to our upcoming webinar: Mastering email etiquette and best practices to follow in Zoho Mail. Join our live webinar for expert etiquette tips to enhance your professionalism and elevate your
      • Recent Topics

      • Canvas templates and font-family

        i dont understant why its always the smallest things that waste all of my time! why in some videos i see they have tamplates in the Canvas editor and i cant seem to fint it? and why oih why cant i cange the font? i just want simple Arial! help meeee
      • how to avoid duplicate customer

        How can i avoid to create a duplicate customer. I charged a same customer with two different plans and it showed up twice in my customer list and subsequently in Zoho books contacts. It creates confusion to have a same customer appears multiple times in customer or contact list. How can i avoid it.
      • The Social Wall: January 2026

        Hello everyone, We’re back with the first edition of The Social Wall of 2026. There’s a lot planned for the year ahead, and we’re starting with a few useful features and improvements released in January to help you get started. Create a GBP in Social
      • API keys not showing in ZeptoMail dashboard

        Hi there, I'm hoping someone can provide some assistance as support isn't replying. I am trying to configure my transactional emails, but the dashboard doesn't show any of my API details - the `div` is there but it's emtpy. Every time I click "Generate
      • Pipeline: Copying rulesets from one data source to another

        When creating and editing data pipelines, it would be really helpful to be able to copy the ruleset from one data source and 'paste' it to another. This would save time and reduce manual mistakes.
      • Doubt about maximum email reach

        Good morning, greetings. This is Bramdon García from EDULABS S.A.S ESP, located in Colombia. I'm writing to inquire about the possibility of sending an email to 35,000 people simultaneously. Our company has a Zoho account, but we'd like to know if there's
      • Zoho calendar not working in browser

        Hello, I am new to Zoho. I have two accounts for two separate businesses. In one of them, calendar loads in a browser no problem. However, if I use this account (sairfeetmusic.co.uk) calendar does not load. I also cannot add it to my Thunderbird Lightening
      • Authentication Failure when adding POP3 accounts

        Hi everyone, I am a new user currently migrating from Gmail to Zoho Mail. I decided to make the switch following Google's decision to discontinue POP3 fetching. I previously used Gmail as my primary mail hub, and Zoho seems like the perfect alternative
      • Trident Application Folder

        Hi, How to choose installation folder for Trident, by default it gets installed in C drive. How to change drive?
      • How exactly does "Reply assistance" work in Zoho Desk? What context is sent to the LLM?

        Hi, Im trying to better understand the technical behavior of the feature "Reply assistance" in Zoho Desk, and I couldn’t find detailed information in the current documentation. Specifically, I have questions about what data is actually being sent to the
      • Email disappeared to specific contact

        Good afternoon, this morning I emailed somebody. This email isn’t showing up in my sent folder. They sent me a response which I clicked on and it disappeared immediately. Why could this be?
      • Deletion Workflows

        Hello, Unless I missed it, we can't create deletion workflows. My usecase is to auto-delete junk leads. We have field called lead status, and an agent qualify all our new leads. When it's a junk lead she chose the correspondant value in the picklist. My goal is that the system delete them automatically. Is that possible? Planed ?
      • How Do Mutliple Sales People Prospect in the "LEADS" module without calling the same leads?

        We have 4 sales reps and the Leads module does not have real time intuitive knowlodge to make the sales rteps dont call the same people at the same time. How can we crate a fluent prospecting sytem where the salres reps can go out bound without calling
      • Create an Eye-Catching Announcement Widget for Your Help Center

        Hello Everyone! In this week’s edition, let’s explore how to keep your customers updated with exciting news in the Help Center. See how ZylkerMobile wowed their customers by bringing updates right to their portal. ZylkerMobile, the renowned brand for
      • Enable Free External Collaboration on Notecards in Zoho Notebook

        Hi Zoho Notebook Team, I would like to suggest a feature enhancement regarding external collaboration in Zoho Notebook. Currently, we can share notes with external users, and they are able to view the content without any issue. However, when these external
      • Updating records through Zoho Sheets View doesn't update timeline or trigger workflow rules

        I have noticed that when i update a series of record with the zoho sheets view (see here http://d.pr/i/ahnR) it doesn't update timeline history or trigger workflow rules. I am using it in the Deals module. Looking forward for some more info. Denis
      • How do I change the account bank charges are charged to?

        I want bank charges charged to my Credit Card Fees account. Is there a way to do this?
      • ZOHO.CRM.UI.Record.open not working properly

        I have a Zoho CRM Widget and in it I have a block where it will open the blocks Meeting like below block.addEventListener("click", () => { ZOHO.CRM.UI.Record.open({ Entity: "Events", RecordID: meeting.id }).catch(err => { console.error("Open record failed:",
      • Mail Search should allow grouping by conversation like Gmail.

        Having switched from gmail I have found the search function hard to use. Mostly because mail is not grouped by conversation in search. If I search for a word when looking for a conversation had with someone then sometimes 10 emails will come up from the
      • Ability to CC on a mass email

        Ability to CC someone on a mass email.
      • Updation of Old Browsers Versions for Zoho CRM

        We have upgraded the default browser version for CRM to facilitate features like widgets and scripts that are often implemented aside from advanced functionalities for various business requirements. The latest version is aimed to provide better performance
      • Project-Based Inventory Consumption and Proforma Invoice in Zoho ERP

        While working with customers across different industries, we have identified a few functional questions and gaps that commonly arise—especially for project-based and service-oriented businesses. Many organizations, such as those in shipping, construction,
      • Zoho Desk domain Mapping not Working Showing CNAME Error

        I have created the subdomain and created the Cname as well as its instracted on the Zoho website  but when i try add the domain on help desk its showing error msg : Make sure you've mapped the CNAME entry and linked it to desk.cs.zohohost.com.au on your
      • Founders using Zoho — are you leveraging Zoho Campaigns + Zoho Social for thought leadership… or just sending emails?

        I’ve noticed something interesting in the Zoho ecosystem. Many founders use Zoho Campaigns and Zoho Social for basic marketing—newsletters, scheduled posts, and announcements. But very few are using these tools strategically to: • Position themselves
      • I have the item field and Quantity field in the sub form , on the submit of the form if the quantity is grater than inventory means show alert on submit validation only for item type goods ,

        I have the item field and Quantity field in the sub form , on the submit of the form if the quantity is grater than inventory means show alert on submit validation . Stock Check Validation only for item type goods , not for item type service . For the
      • IMAP stopped working after enabling 2 factor authentication

        IMAP stopped working after enabling 2 factor authentication. Is there any solution for this?
      • Rename Service Report

        Some of our customers are requesting the name of the service report PDF to be in a specific format, for example, instead of REP-001.PDF some are requesting to include their name like customername.pdf. is that possible?
      • Approvals in Zoho Creator

        Hi, This is Surya, in one of  my creator application I have a form called job posting, and I created an approval process for that form. When a user submits that form the record directly adding to that form's report, even it is in the review for approval.
      • Outgoing emails rejected due to SpamCop RBL listing (IP 136.143.188.12)

        Hi All, I am writing to report a deliverability issue affecting outgoing emails from my Zoho Mail account. Recently, several messages sent from my domain (example.com) to external recipients have been rejected with the following error message (redacted
      • Introducing Workqueue: your all-in-one view to manage daily work

        Hello all, We’re excited to introduce a major productivity boost to your CRM experience: Workqueue, a dynamic, all-in-one workspace that brings every important sales activity, approval, and follow-up right to your fingertips. What is Workqueue? Sales
      • Share Record Ownership in Zoho Recruit

        We’re introducing User Fields in Zoho Recruit designed to make collaboration easier when multiple team members need to work on the same record. With User Fields, you can extend record ownership beyond a single user and enable smoother teamwork across
      • Recherche d'un développeur

        Bonjour, j'ai un projet de SAAS sur une base de zoho créator et zoho CRM et je recherche un développeur qualifié français pour créer l'application créator (fonctionnel et graphique) et les workflow et blueprint de CRM
      • API to Apply Retainer invoice payment to Invoice

        Hi Team, I could not find  API to apply the Retainer invoice payment to existing Invoice. Can you please help ? Attaching the screenshot
      • Display actual mileage on an invoice

        My users are creating expenses in Zoho expense. For example, they expense 10 miles and get paid 7 dollars (10 miles * IRS rate of .70). If I look at the expenses in Zoho Books, it does show them at 10 miles at .70 cent When I add these expense to an invoice
      • Customer Parent Account or Sub-Customer Account

        Some of clients as they have 50 to 300 branches, they required separate account statement with outlet name and number; which means we have to open new account for each branch individually. However, the main issue is that, when they make a payment, they
      • Cloning a Pick List

        I have an existing Pick List in my Contacts that I want to drop into my Leads.  Is there a way to copy or clone the field with it's accompanying Pick List?  Thanks for your time.
      • How do I link my invoice to an estimate?

        There has been instances where I have created estimates, however, invoices for the same estimate were created independently. The status of these estimates hasn't converted to 'invoiced'. 
      • I wish to upload 40000 Resumes in Zoho Recruit Database. Can I do this in batch of 1000 Resumes ?

        I would like to upload thousand or few hundred of resumes in Zoho Recruit in one go. Please let me know how can I do this Or migrate my 40000 resumes from previous ATS to Zoho Recruit.
      • Zoho Writer for Proposals

        Hi, one of the things we've struggled with since moving to Zoho ecosystem is our proposal software Qwilr does not integrate well. It surprises me Zoho doesn't have proposal software but given all the capabilities of Zoho Writer, I'm wonder if anyone is
      • Custom Fonts in Zoho CRM Template Builder

        Hi, I am currently creating a new template for our quotes using the Zoho CRM template builder. However, I noticed that there is no option to add custom fonts to the template builder. It would greatly enhance the flexibility and branding capabilities if
      • Next Page