Email sending not working #1023
-
Hello, I've been trying to make the email sending work but I keep on getting The test logs: Connected to smtps://smtp.gmail.com:465/
<< 220 smtp.gmail.com ESMTP f25-20020a633819000000b005dc49afed53sm2822880pga.55 - gsmtp
>> EHLO [172.31.11.248]
<< 250-smtp.gmail.com at your service, [54.212.131.181]
<< 250-SIZE 35882577
<< 250-8BITMIME
<< 250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH
<< 250-ENHANCEDSTATUSCODES
<< 250-PIPELINING
<< 250-CHUNKING
<< 250 SMTPUTF8
>> AUTH PLAIN AGRldmVsb3BtZW50QGt1cnJvdy5jb20AY2NqcyBwaHBvIHh3cXYgb2Jkag==
<< 235 2.7.0 Accepted
>> MAIL FROM:<[email protected]> SIZE=557
>> RCPT TO:<[email protected]>
<< 250 2.1.0 OK f25-20020a633819000000b005dc49afed53sm2822880pga.55 - gsmtp
<< 250 2.1.5 OK f25-20020a633819000000b005dc49afed53sm2822880pga.55 - gsmtp
>> DATA
<< 354 Go ahead f25-20020a633819000000b005dc49afed53sm2822880pga.55 - gsmtp
>> From: [email protected]
>> Date: Tue, 13 Feb 2024 20:19:38 퍍
>> Subject: SMTP test from smtp.gmail.com
>> Message-Id: <1EXIS9F5AMU4.W0WKOLLIF9EL@WIN-AUIR3RRGP88>
>> To: [email protected]
>> MIME-Version: 1.0
>> Content-Type: multipart/alternative; boundary="=-MsbYPIzp�떢Ⱕ궇=="
>>
>> --=-MsbYPIzp�떢Ⱕ궇==
>> Content-Type: text/plain; charset=utf-8
>>
>> Test message
>> --=-MsbYPIzp�떢Ⱕ궇==
>> Content-Type: text/html; charset=utf-8
>> Content-Id: <1EXIS9F5AMU4.KAOB1GMAGD2Q1@WIN-AUIR3RRGP88>
>>
>> <b>Test message</b>
>> --=-MsbYPIzp�떢Ⱕ궇==--
>> .
<< 250 2.0.0 OK 1707855585 f25-20020a633819000000b005dc49afed53sm2822880pga.55 - gsmtp My <?php
namespace Config;
use CodeIgniter\Config\BaseConfig;
class Email extends BaseConfig
{
public string $fromEmail = '[email protected]';
public string $fromName = 'Philippine VA Pros Services';
public string $recipients = '';
/**
* The "user agent"
*/
public string $userAgent = 'CodeIgniter';
/**
* The mail sending protocol: mail, sendmail, smtp
*/
public string $protocol = 'mail';
/**
* The server path to Sendmail.
*/
public string $mailPath = '/usr/sbin/sendmail';
/**
* SMTP Server Hostname
*/
public string $SMTPHost = 'smtp.gmail.com';
/**
* SMTP Username
*/
public string $SMTPUser = '[email protected]';
/**
* SMTP Password
*/
public string $SMTPPass = 'the_password';
/**
* SMTP Port
*/
public int $SMTPPort = 465;
/**
* SMTP Timeout (in seconds)
*/
public int $SMTPTimeout = 60;
/**
* Enable persistent SMTP connections
*/
public bool $SMTPKeepAlive = false;
/**
* SMTP Encryption.
*
* @var string '', 'tls' or 'ssl'. 'tls' will issue a STARTTLS command
* to the server. 'ssl' means implicit SSL. Connection on port
* 465 should set this to ''.
*/
public string $SMTPCrypto = 'ssl';
/**
* Enable word-wrap
*/
public bool $wordWrap = true;
/**
* Character count to wrap at
*/
public int $wrapChars = 76;
/**
* Type of mail, either 'text' or 'html'
*/
public string $mailType = 'html';
/**
* Character set (utf-8, iso-8859-1, etc.)
*/
public string $charset = 'UTF-8';
/**
* Whether to validate the email address
*/
public bool $validate = false;
/**
* Email Priority. 1 = highest. 5 = lowest. 3 = normal
*/
public int $priority = 3;
/**
* Newline character. (Use “\r\n” to comply with RFC 822)
*/
public string $CRLF = "\r\n";
/**
* Newline character. (Use “\r\n” to comply with RFC 822)
*/
public string $newline = "\r\n";
/**
* Enable BCC Batch Mode.
*/
public bool $BCCBatchMode = false;
/**
* Number of emails in each BCC batch
*/
public int $BCCBatchSize = 200;
/**
* Enable notify message from server
*/
public bool $DSN = false;
} Or should I switch to a different email account(not gmail)? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can use email under the Domain or Gmail because Codeigniter does not limit you. |
Beta Was this translation helpful? Give feedback.
You can use email under the Domain or Gmail because Codeigniter does not limit you.
It seems that your configuration is not correct.
See the here which explains the configuration file for Gmail or your domain.
or read the official documents CI4.