Unable to send email from PHP using smtp with PHPMailer

Unable to send email from PHP using smtp with PHPMailer


<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>
        <?php
            require_once './resources/PHPMailer-master/PHPMailerAutoload.php';
            $mail = new PHPMailer;
            $mail->SMTPDebug = 4;                         
            $mail->isSMTP();                                     
            $mail->Host = 'smtp.zoho.com'; 
            $mail->SMTPAuth = true;                   
            $mail->Username   = " example@mydomain.com"; 
            $mail->Password   = "password";
            $mail->SMTPSecure = 'ssl';                          
            $mail->Port = 465;

            $mail->From = 'example';
            $mail->FromName = 'Doe';
            $mail->addAddress('sending address, 'John');     // Add a recipient              // Name is optional
            $mail->isHTML(true);                                  // Set email format to HTML
            $mail->Subject = 'Here is the subject';
            $mail->Body    = 'This is the HTML message body <b>in bold!</b>';
            $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';

            if(!$mail->send()) {
                echo 'Message could not be sent.';
                echo 'Mailer Error: ' . $mail->ErrorInfo;
            } else {
                echo 'Message has been sent';
            }
        ?>
    </body>
</html> 

 
Though it works perfectly on my localhost, it doesn't work from my server . (it has open ssl )

      • Sticky Posts

      • Important update! Re-authentication mandated for sensitive admin operations in Admin Console.

        Dear Zoho Mail Community, Hope you're all doing good and staying safe! As we strive to provide you with better security for your business email needs, an additional measure has been taken to ensure more security to the sensitive Admin Operations performed
      • Important announcement: IPv6 support in Inbound gateway

        Greetings from Zoho Mail team. We are happy to announce the support of IPv6 support for receiving emails in Zoho Mail. This post mainly addresses the admins who have configured inbound gateway for their organisation. As a part of the changes related to
      • Administrators now have permissions to access the Subscription and Payment details.

        Hello everyone! Hope you are all staying safe during these trying times. To ensure that your organization's email service, the backbone of communication, does not get affected due to inadvertent negligence by the super administrator, we have made a few changes in our roles and permissions to handle subscription and renewal smoothly. Earlier, any organization's Subscription and Payment information in Zoho Mail could be accessed only by the organization's Super Administrator. Now, based on requests
      • Move ahead from Docs to WorkDrive - WorkDrive is now available in all Workplace plans!

        Dear all,  We are glad to announce that WorkDrive is available across all the Workplace plans, with added storage and extensive team features.  Zoho WorkDrive is now available for all users, including those who subscribed before Zoho WorkDrive was introduced
      • Announcement - Changes in Custom login page

        In continuation to our efforts in protecting your Zoho Mail account we have made a few changes in the custom login page. We are making some enhancements in the browser to server communication to make it more secure.  You may be aware of the most of the modern web browsers mandate certain security practices to showing the webpages as 'Secure'.  We are rolling out the security related enhancements ensure that our custom login page accessed only in https mode and the authentication is securely done

        • Recent Topics

        • Deluge upload to upload file field

          Trying to upload a file to a field type Upload File. I believe I have most correct. I have a merge and download from writer. I have this same script in many other functions and it works fine. I then upload the file to ZFS and get a success response However,
        • How to make the default currency type in a certain module different from the base currency>

          We have US dollar as the base currency. Also we have two more other currency types. In a custom module, we would like to make another currency as the default one rather than USD. Is it possible to do? How? Thank you very much!
        • Alternatives to using multi-select lookup field for a 1-many module relationship?

          I have 2 modules where I only need multi-select lookup option on one of them and the other always has a 1-1 relationship. Do I have to use a multi-select lookup field in this case? Is there another way to solve this? Am asking because I've hit the limit
        • Subform Time field showing as null in script.

          Good Afternoon everyone. I am trying to take the information from my subform and populate it into a multiline field in the CRM. The code below works with no errors. The problem is, it shows that the Open and Close (Time fields) are null. But they are
        • O que é o Code Studio no Zoho Analytics?

          Olá Pessoal, Colocando um pouco de informação sobre uma feature do Zoho Analytics chamada Code Studio. O Code Studio é: ‌Funcionalidade que permite desbloquear recursos de Data Science e Machine Learning (DSML) no Zoho Analytics. Utiliza código Python
        • Usuários do Zoho Recruit no Brasil

          Gostaríamos de interagir com outros usuários do Zoho Recruit. Acabamos de completar um ano de utilização. Quem mais usa? se usa outra qual é?
        • Sobre qual tema você gostaria de falar em 2025?

          Olá Pessoal, Quais temas que gostariamos de explorar em 2025? - Zoho CRM Customizações Básicas - Zoho CRM Funções Personalizadas - Zoho Desk Básico - Zoho Desk Avançado - Zoho Analytics - Zoho Creator Deixe a sua opinião
        • Sobre qual tema você gostaria de falar em 2025?

          Olá Pessoal, Quais temas que gostariamos de explorar em 2025? - Zoho CRM Customizações Básicas - Zoho CRM Funções Personalizadas - Zoho Desk Básico - Zoho Desk Avançado - Zoho Analytics - Zoho Creator Deixe a sua opinião
        • Need manual aggregate column pathing help

          See linked video here: https://workdrive.zohoexternal.com/external/a5bef0f0889c18a02f722e59399979c604ce0660a1caf50b5fdc61d92166b3e7
        • Automatic Updates for Zoho Desk Extensions

          Dear Zoho Desk Team, I hope you're doing well. We would like to request the addition of an automatic update feature for Zoho Desk extensions. Currently, updating extensions requires manually searching for updates and clicking the update button. This process
        • Contemplating moving my site from WordPress to Zoho Sites

          Hi Everyone, We currently find ourselves in a situation where we ant to review and update our current sites content. We are small business owners, not developers. We currently use a wide range of Zoho products. We sometimes think about the possibility of either moving or just starting from scratch on Zoho Sites. I would like to know if anyone has done this and of course the things that need to be considered. We have spent quite a bit of time getting our current site positioned organically and I guess
        • Elevating Email Security on Zoho Desk: DKIM Now Mandatory

          Hello Zoho Desk Users! It has been a wonderful journey with you on Zoho Desk. As we prepare to welcome 2025, we are strengthening our efforts to ensure a secure and seamless experience for you. To enhance email security, DKIM configuration will be mandatory
        • Integrating Calendly with Zoho Calendar in Zoho Mail

          I moved my office into a business incubator space that uses Calendly for meeting management and events. Calendly doesn't have a integration with Zoho Calendar and vice versa. I was directed to Zapier for integration but it doesn't have an integration
        • US to EU Data Migration done / Workflows and Custom Functions stopped working

          Hello, I need help to restore my workflow rules and custom functions to work. My data was transferred from the US to the EU (Data center migration). Now all Workflow Rules and Custom Functions not working. I have no idea how to restore them to work again.
        • Is there a Kanban view of Tasks across all Projects?

          As the title indicates, I could use a Kanban view of my Tasks across my Projects. If it's there, I don't see it. If it isn't there, I'd like to submit this as a feature request. Thx.
        • Change email template depending on answer from form

          Is it possible to set up the following in Zoho Desk: When a user submits a ticket via the Zoho Help Center's form, they can select an answer from a dropdown field. In this example, the dropdown options are 'Option A' and 'Option B.' If a user selects
        • Creator Subform to CRM Subform

          Hello all, Has anyone successfully written data from a Creator Subform into CRM subform? I have a Creator form that once submitted creates a new Location in the CRM. Inside a Location there is a subform for hours of operation. I collect those hours in
        • How to view all departments on one dashboard or ticket view?

          Hi guys, We've just started using Zoho Support and found a very weird quirk. It seems that you need to click into each deparment to view the new tickets instead of just seeing a global dashboard of all tickets across all departments. Seems very odd, is this correct or are we missing something? If this is currently not possible, can someone from Zoho let us know if a global dashboard view is going to be developed soon? How soon? This is going to be a dealbreaker for us as we have lots of departments...
        • Demande : Épingler automatiquement un commentaire via Deluge

          Bonjour, Je suis utilisateur de Zoho Desk et j'ai développé une fonction avec Zoho Deluge permettant d'ajouter automatiquement un type de commentaire à chaque création de ticket. Cependant, j'aimerais pouvoir épingler ces commentaires directement depuis
        • Is Drawing feature supported in zoho Sheets?

          Is there any option to draw arrows and some basic shapes such as circle , rectangle etc in zoho sheets? if so, can someone help me find it 
        • Cannot fetch url with custom extension (sigma - javascript)

          Hello i try to make my first extension with API request, i have two cases 1) this a deluge code attach to a button --> this one works very well response = invokeurl [ url :"my_api_fetch_url" type :GET headers:{"api_key":"myapikey","accept":"application/json","content-type":"application/json"}
        • UI Arabic

          can i change the member portal UI to arabic in zoho community?
        • Conexion CREATOR x CRM

          Buenas tardes, Tengo un problema con un código que crea un registro en CRM. Revisé el CRM para eliminar los campos obligatorios, pero cuando ejecuto el programa, aparece el siguiente mensaje de error: {"code":"MANDATORY_NOT_FOUND","details":{"api_name":"data"},"message":"required
        • Is there a way to sync Tags between CRM and Campaigns/Marketing Hub?

          I wonder if there is a way to synch the tags between CRM and Marketing-Hub / Campaigns?
        • IP Addresses for Whitelist

          Hi,  Where can I get a list of the IP addresses I need to whitelist for accessing Zoho Desk? TIA
        • We would like to make a separate, internal-only knowledge base. Is it possible to have a public department but not display it in the help center?

          It seems like it is not possible to display/hide the knowledge base from the help center per department.  Is there a way to do this? It looks like all department knowledge bases are displayed if they are public, and there is no way to hide one from the help center while keeping it accessible via a permalink URL. For example, lets say I have one KB for Clients and one for Employees.    I want to keep my Clients KB public, and also want the Employees KB to be public, but NOT displayed in the help center.
        • Template Email Reset Password

          Hi It is possible to customize the email that comes to a Customer Portal user? It comes in English and need this in Spanish. Esteban Elias Preventa Tecnica - Educacion Xpears.com
        • The Zoho Meeting Video Quality Crisis

          I'm evaluating Zoho One for my business in Switzerland, and I must address a critical concern that threatens our potential adoption of the platform—the persistently poor performance of Zoho Meeting's video conferencing capabilities. In today's digital-first
        • Possible to customise list of file attachment options?

          Is it possible to customise (disable/remove) the list of file attachment options (see screenshot below)? I would like the users to only use the options "Link (URL)" and "Other Cloud Drives". I have super admin rights to customise the CRM.
        • CRM became very slow

          Plz check asap. image failed to upload , workflow doesn't run
        • Automating CRM backup storage?

          Hi there, We've recently set up automatic backups for our Zoho CRM account. We were hoping that the backup functionality would not require any manual work on our end, but it seems that we are always required to download the backups ourselves, store them,
        • Ayuda con zoho creator x zoho Crm

          Hola a todos, Estoy teniendo dificultades al sincronizar datos entre Zoho Creator y Zoho CRM. Mi objetivo es lo siguiente: Busque un registro en el módulo Contactsde Zoho CRM utilizando el correo electrónico del registro de Zoho Creator. Si se encuentra
        • Invoices with billable time and expenses

          I cannot seem to get a straight answer. We are looking to create an invoice to send to our clients, but it needs to have the following on it: 1. Billable hours for each employee. All hours for the pay period on one line, by employee. 2. Expenses for each
        • URL for downloading uploaded file - THE SOLUTION

          Hi, I would like to share the solution for downloading uploaded files using url. There is no documentation for it and there are multiple forum threads with old solutions that didn't work for me. Here is the updated url - tested and works! fet = form_name[ID
        • All Tasks Queued for Last 3+ Hours

          How does one resolve this? All of my tasks, from many different Flows, are stuck in the "Queued" status. This is interrupting my business processes, which depend on the timely execution of automations.
        • Unable to access Zoho Desk at all - has an extreme slow load and then just remains blank

          This is all I see:
        • Why can't I connect to the software suddenly? Network error, internal error, unable to contact you

          Why can't I connect to the software suddenly? Network error, internal error, unable to contact you
        • Auto Generated Invoice number YEAR

          Auto Generated Invoice number shows transaction year as 25 even though it's 24 still.
        • The Social Wall: December 2024

          Hey everyone, As the year comes to an end, and the festive spirit fills the air, we're thrilled to bring to you the final edition of the Social Wall for 2024. Let's see what updates went live during December, and then go on with planning the new year!
        • Not displaying a newly created window within an application

          On a specific stock trading application (see image below), when a newly created full screen operation is invoked (File->New) oft times it is invisible (the mouse input is correctly routed to the new window but the hover over contents shows the invisible
        • Next Page