First, make sure you PHP installation has SSL support (look for an “openssl” section in the output from phpinfo()
).
You can set the following settings in your PHP.ini:
ini_set("SMTP","ssl://smtp.gmail.com");
ini_set("smtp_port","465");
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
- Unable to send email using Gmail SMTP server through PHPMailer, getting error: SMTP AUTH is required for message submission on port 587. How to fix?
- 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 Connect() failed. Message was not sent.Mailer error: SMTP Connect() failed
- smtp configuration for php mail
- When using Gmail for SMTP, can you set a different “from” address?
- PHP on GoDaddy Linux Shared trying to send through GMAIL SMTP
- mail(): SMTP server response: 550 The address is not valid error on hmailserver
- Sent mails with phpmailer don’t go to “Sent” IMAP folder
- trying to send mail using swift mailer, gmail smtp, php
- How to send email with SMTP in php
- Could not connect to SMTP host
- Setting up DomainKeys/DKIM in a PHP-based SMTP client [closed]
- PHPMAILER Not sending and not giving error
- phpmailer send gmail smtp timeout [duplicate]
- PHPMailer error: SMTP -> ERROR: Failed to connect to server
- Given an email as raw text, how can I send it using PHP?
- phpmailer – The following SMTP Error: Data not accepted
- Having issue with matching rows in the database using PDO
- Call to undefined function __() error – phpMyAdmin
- Reverse array in php
- How does array_diff work?
- How to convert all characters to their html entity equivalent using PHP