Remove or comment out the line-
$mail->IsSMTP();
And it will work for you.
I have checked and experimented many answers from different sites but haven’t got any solution except the above solution.
More Related Contents:
- Send email using the GMail SMTP server from a PHP page
- How to check if an email address exists without sending an email?
- Sending email with PHP from an SMTP server
- Sending email with gmail smtp with codeigniter email library
- Failed to connect to mailserver at “localhost” port 25
- How to change from-address when using gmail smtp server
- php.ini & SMTP= – how do you pass username & password
- PHPMailer – SMTP ERROR: Password command failed when send mail from my server
- problem with php mail ‘From’ header
- smtp configuration for php mail
- When using Gmail for SMTP, can you set a different “from” address?
- How to send email with SMTP in php
- Given an email as raw text, how can I send it using PHP?
- phpmailer – The following SMTP Error: Data not accepted
- Query database then email posts from where user is subbed to
- how can i send an attachment with php using (mail) [duplicate]
- Send HTML in email via PHP
- How to get the content-type of a file in PHP?
- How to get email address from a long string
- Trying to get Laravel 5 email to work
- Laravel mail: pass string instead of view
- PHP mail() attachment problems
- PHP on GoDaddy Linux Shared trying to send through GMAIL SMTP
- Sent mails with phpmailer don’t go to “Sent” IMAP folder
- trying to send mail using swift mailer, gmail smtp, php
- how to send an HTML email with an inline attached image with PHP
- Why is my e-mail still being picked up as spam? Using mail() function
- phpMailer – How do you Remove Recipients
- DOMPDF – attach created PDF to email
- Simple PHP form: Attachment to email (code golf)