Use php function mail() with zohomail smtp servers

Use php function mail() with zohomail smtp servers

Hello,

I was wondering if it is possible to use the php mail() function with my email account on zohomail
I tried, but nothing happened

for example:
  1. <?php

  2. ini_set('SMTP','smtp.zoho.com');
  3. ini_set('smtp_port',465);
  4. ini_set('sendmail_from', 'admin@moderactif.com');

  5. //define the receiver of the email
  6. $to = 'niko@moderactif.com';
  7. //define the subject of the email
  8. $subject = 'Test for title'; 
  9. //define the message to be sent. Each line should be separated with \n
  10. $message = 'Message to send'; 

  11. //define the headers we want passed. Note that they are separated with \r\n
  12. $headers = 'From: admin@moderactif.com\r\nReply-To: admin@moderactif.com';

  13. //send the email
  14. $mail_sent = mail($to, $subject, $message, $headers);
  15. mail($to, $subject, $message, $headers);

  16. //if the message is sent successfully print "Mail sent correctly". Otherwise print "Mail failed" 
  17. echo $mail_sent ? "Mail sent" : "Mail failed";
  18. ?>
    Zoho Marketing Automation
            • Sticky Posts

            • One Drive Integration - Attachments and Filters - Authenticating your account

              Hello everyone!  Greetings from Zoho Mail team.  Zoho Mail provides integrations with multiple platforms and cloud storage accounts to assist users using different services to easily use their mail related actions with those applications. On a similar note, Zoho Mail also provides integration with Microsoft OneDrive to enable users to attach files from OneDrive or add the files they receive via email to OneDrive.  Our integration also allows the users to configure OneDrive in the Filter actions to
            • Zoho Mail - Delay in Receiving Emails

              Hello, We experienced a minor glitch within Zoho Mail service due to this there was a delay in processing all the incoming emails. Our technical team had identified and fixed the same. Processing the queue backlog is under progress. New emails will get
            • Free live webinar: Hassle free migration from G Suite to Zoho Mail

              Hello everyone!  Greetings from all us in the Zoho Mail team.  ‘Email migration’ can be a daunting process, and we want to help you get it right.  To ensure that you are equipped with the necessary insights regarding migration, we have scheduled a webinar
            • Attention Workplace admins - Migrate your files from Zoho Docs to Zoho WorkDrive

              Dear all,  As mentioned in this announcement, Zoho WorkDrive is now available across all Workplace plans to enable team collaboration. Zoho WorkDrive provides common file storage for teams and enables collaboration among organization members. Zoho WorkDrive
            • Accessing Zoho Mail Service!

              Hello All,  Zoho Mail Services across IN deployment is currently experiencing downtime. Due to this, users will notice the following error "We will be right back" or loading issues while accessing via web browser. Our technical team is currently working

            Zoho Pagesense Resources

              Zoho SalesIQ Resources



                    Zoho TeamInbox Resources

                      Zoho DataPrep Resources



                        Zoho CRM Plus Resources

                          Zoho Books Resources


                            Zoho Subscriptions Resources

                              Zoho Desk Resources

                                Zoho Projects Resources


                                  Zoho Sprints Resources


                                    Qntrl Resources


                                      Zoho Creator Resources


                                        Zoho WorkDrive Resources




                                            Zoho Campaigns Resources

                                              Zoho CRM Resources

                                                      Design. Discuss. Deliver.

                                                      Create visually engaging stories with Zoho Show.

                                                      Get Started Now