Welcome Guest, Not a member yet? Register   Sign In
  intermittent smtp failures with gmail
Posted by: miked - 04-24-2025, 08:57 AM - Replies (1)

CI version 3.1.13
We've seen this more than a few times where, out of the blue, sending mail thru google randomly declines to auth.  Usually about 24 hours or so later the problem resolves itself.  

No changes to my config/email.php file since Dec of '23.  

Sending 200ish emails a day will work fine for months on end, and then suddenly I human notified that emails that CI has sent are not appearing in the gmail sent mail folder.  

The CI logs show about 1 in 10 smtp failure messages like the one below.  Server is running on a DigitalOcean droplet in the SF region.  Requested help at DO as well.

How can I best troubleshoot this? 

Code:
220 [url=http://smtp.googlemail.com]smtp.googlemail.com[/url] ESMTP<uuid>.110 - gsmtp
<br /><pre>hello: 250-smtp.googlemail.com at your service, [159.65.78.78]
250-SIZE 35882577
250-8BITMIME
250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-CHUNKING
250 SMTPUTF8
</pre>Failed to authenticate password. Error: 535-5.7.8 Username and Password not accepted. For more information, go to
535 5.7.8  [url=https://support.google.com/mail/?p=BadCredentials]https://support.google.com/mail/?p=BadCredentials[/url] <uuid>.110 - gsmtp
<br />Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.<br /><pre>Date: Thu, 24 Apr 2025 15:24:09 +0000

My config/email.php:

Code:
$config['useragent'] = '';
$config['protocol'] = 'smtp'; 
$config['mailpath'] = '/usr/sbin/sendmail'; 
$config['smtp_host'] = 'ssl://smtp.googlemail.com'; 
$config['smtp_user'] = '[email protected]'; 
$config['smtp_pass'] = 'passwd'; 
$config['smtp_port'] = 465; 
$config['smtp_timeout'] = 30; 
$config['smtp_keepalive'] = FALSE; 
$config['smtp_crypto'] = ""; 
$config['wordwrap'] = TRUE; 
$config['wrapchars'] = 76; 
$config['mailtype'] = 'html'; 
$config['charset'] = 'utf-8';
$config['validate'] = FALSE;
$config['priority'] = '3'; 
$config['crlf'] = "\r\n"; 
$config['newline'] = "\r\n"; 
$config['bcc_batch_mode'] = ''; 
$config['bcc_batch_size'] = ''; 
$config['dsn'] = ''; 


  JetBrains PHPverse 2025 Join the free virtual event along with community experts to c
Posted by: InsiteFX - 04-24-2025, 07:06 AM - No Replies


  Is hiring a digital marketing agency really worth it for startups?
Posted by: moana23 - 04-24-2025, 01:00 AM - Replies (2)

Hey folks,
I'm in the early stages of launching my startup and I keep hearing that working with a digital marketing agency can make a big difference in growth and online presence. But I’m not totally convinced yet—there’s a lot of conflicting advice out there.
So I wanted to ask: Has anyone here actually hired a digital marketing agency when their business was just starting out? What kind of impact did it have? Was it worth the cost?
Also, what should a startup really expect from a digital marketing agency? I’m talking realistic outcomes—not just vague promises of "more traffic."
Would love to hear any personal experiences or tips before I commit to anything. Thanks in advance!


  which linter to use (and how to setup)?
Posted by: dilawar - 04-23-2025, 09:46 PM - Replies (2)

Hi,
I am using codeigniter4 (first time). At work, I used laravel based project with a very good psalm support.

I am struggling to get psalm to work with ci4 -- out of box. A lot of errors are being thrown -- most of which is about missing functions and classes!
I tried tweaking settings a bit but I didn't get far.

Before I spend more time "having fun" fixing it, I was wondering if there is a tutorial/library that allows me to integrete psalm (or any other linter)?

In other words -- what is the recommended way to lint ci4 project?
best,
  Dilawar


  error 404 not found.
Posted by: Cind1944 - 04-23-2025, 08:39 PM - No Replies

Hi
it's possible to make the codeigniter compatible with nginx and vestacp?
i've an problem with this, and most of the users had seen this:
error 404 not found.
soo, i would like to tell directly to the developers and coders that it would be an great help if this framework had support for this platform, because we can't modify the files from the website config widout making an huge mess to all the websites.

Thank


  Receiving Email from within CI 4 and possible integration with the built-in Email cla
Posted by: gosocial2 - 04-23-2025, 07:11 AM - Replies (2)

Hello friends and community members,

I reached a point where at least one of my CI4 apps needs to receive (or intercept incoming) e-mail, and it looks like the built-in Email class has no facility for it - which is natural.

Common sense would point to a 3rd party library, and in today's jungle of 'me too' products ranging from 'great fit's to misfits, I wanted to ask experts who might have already done this before. 

What do you think is the best email client library for integrating with CI4 compatible with PHP 8.3 (or 8.4 even better)?

My specific need is to receive (or intercept) emails sent to a specific account, do some processing (analytics, maybe also SPAM check), and then re-forward the same e-mail to a pre-defined set of recipients. I can do the sending already thanks to the built-in 

Email class, but receiving is not possible with the built-in classes and/or functions AFAIK.

Any ideas?


  Problem with CLI script routing or execution
Posted by: massimiliano1.mancini - 04-22-2025, 05:34 AM - Replies (3)

Hi All,
I'm trying to add some cron scheduled jobs to my site. I've started with a simple controller:

PHP Code:
<?php

namespace App\Controllers\CLI;

use 
CodeIgniter\Controller;

class 
Cronjob extends Controller
{
    public function cliMessage($to 'World')
    {
        return "Hello {$to}!" PHP_EOL;
    }


When I call it in my public directory

Code:
php index.php CLI/cronjob message

no output is showed. The index.php and routing are executed for sure, infact if I make some mistakes on porpouse, they are showed. For example, this is the output of the following command

Code:
PS C:\develop\horizon\public> php index.php CLI/cronjob mAssage
ERROR: 404

Controller or its method is not found: \App\Controllers\CLI\Cronjob::cliMAssage

Any help is appreciated.


  Experience Migrating from CodeIgniter 3 to CodeIgniter 4 – What to Watch Out For?
Posted by: markbsalinas - 04-20-2025, 09:21 PM - Replies (1)

Xin chào mọi người,
Hiện tại tôi đang bảo trì một dự án cũ được xây dựng bằng CodeIgniter 3 và nhóm của chúng tôi đang cân nhắc nâng cấp dự án này lên CodeIgniter 4 để tận dụng các tính năng mới, kiến trúc gọn gàng hơn và hỗ trợ tốt hơn cho PHP 8+.
Tuy nhiên, chúng tôi đang gặp phải khá nhiều câu hỏi và tôi rất muốn nghe ý kiến từ bất kỳ ai đã trải qua quá trình di chuyển này:

  • Những vấn đề hoặc cạm bẫy thường gặp trong quá trình di chuyển là gì?
  • Có công cụ hoặc tài nguyên nào có thể hỗ trợ quá trình này không?
  • Những phần nào của mã CI3 nên được giữ lại và những phần nào nên viết lại từ đầu?
  • CI4 có thực sự "đáng giá" cho các dự án vừa và nhỏ không?
Rất mong nhận được những hiểu biết và kinh nghiệm của bạn!


  CI4 validation greater_than on date field
Posted by: pippuccio76 - 04-20-2025, 03:33 AM - Replies (5)

HI ,

can i validate date with grater than ? 
this is my validation :

Code:
                'data_tour' => [
                    'label' => 'Data Partenza',
                    'rules' => 'required|valid_date[Y-m-d]|greater_than[' . date('Y-m-d') . ']',
                    'errors' => [
                        'required' => '{field} obbligatorio',
                        'valid_date' => ' {field} deve essere una data valida',
                        'greater_than' => ' {field} deve essere maggiore di oggi'.$post['data_tour'].'|'. date('Y-m-d'),                   
                    ]

                ],

and this is the validation (not passed) :
                Data Partenza deve essere maggiore di oggi2025-04-21|2025-04-20
2025-04-21 is bigger than 2025-04-20...


  How can I pass multiple queries from different tables to a single view in CodeIgniter
Posted by: Butted - 04-18-2025, 08:27 AM - No Replies

Hi everyone,
I'm very new to CodeIgniter. I'm trying to send queries from the controller to a single view. I have two different functions, each with a different query, and I want to style their results differently in the same view.
Here’s my controller code:

Code:
public function publications()
{
    $query = $this->db->query('SELECT P_ID, TITLE FROM publications WHERE SSN = 1');
    $data['name'] = 'publications';
    $data['section'] = 'Publication';
    $data['query'] = $query;
    $this->load->view('adel', $data);
}
public function teaching()
{
    $query = $this->db->query('SELECT C_ID, DEP_CODE, C_NAME, C_DESC FROM TEACHING WHERE SSN = 1');
    $data['name'] = 'teaching';
    $data['section'] = 'Teaching';
    $data['query'] = $query;
    $this->load->view('adel', $data);
}
And here’s the corrected view code:
Code:
<div class="col-lg-12">
    <h1><?= $section ?></h1>
    <?php if ($name == 'publications'): ?>
        <?php foreach ($query->result() as $row): ?>
            <?= $row->P_ID ?>: <?= $row->TITLE ?><br><br>
        <?php endforeach; ?>
       
    <?php elseif ($name == 'teaching'): ?>
        <?php foreach ($query->result() as $row): ?>
            <?= $row->DEP_CODE ?><?= $row->C_ID ?> <?= $row->C_NAME ?><br>
            Course Description:<br>
            <?= $row->C_DESC ?><br><br>
        <?php endforeach; ?>
    <?php endif; ?>
</div>

Main fixes:
  • Use == for comparison, not = .
  • Use cleaner PHP short syntax inside HTML.
  • Close PHP properly for loops and conditions.


Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Latest Threads
AbuseIPDB Module
by grimpirate
1 hour ago
Heads up for users using ...
by davis.lasis
8 hours ago
curl + response body
by okatse
9 hours ago
Tool bar not showing
by grimpirate
10 hours ago
The Hidden Cost of “Innov...
by fcoder
Today, 03:11 AM
tool bar not showing
by InsiteFX
Yesterday, 09:09 PM
Validation does not appea...
by grimpirate
Yesterday, 01:55 PM
Block IP addresses of bad...
by grimpirate
Yesterday, 01:47 PM
Override Router
by grimpirate
Yesterday, 01:30 PM
CodeIgniter.com - Report ...
by Vikas Mehta
06-30-2025, 10:30 AM

Forum Statistics
» Members: 154,407
» Latest member: td88gdn
» Forum threads: 78,437
» Forum posts: 379,710

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB